From b3b58e0410ed7722e9274b9105c95c8aee9c9b98 Mon Sep 17 00:00:00 2001 From: skidder Date: Fri, 9 Jan 2004 01:06:12 +0000 Subject: [PATCH] Fix bug introduced during C->C++ porting effort. One of the consequences of this bug were mentioned in the SF#750664 --- src/jrd/cch.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/jrd/cch.cpp b/src/jrd/cch.cpp index 7d8e89c938..0994aa5cdb 100644 --- a/src/jrd/cch.cpp +++ b/src/jrd/cch.cpp @@ -1180,6 +1180,8 @@ void CCH_fini(TDBB tdbb) DBB dbb = tdbb->tdbb_database; BOOLEAN flush_error = FALSE; + do { + try { /* If we've been initialized, either flush buffers @@ -1265,17 +1267,24 @@ void CCH_fini(TDBB tdbb) #endif } + return; + } // try catch (const std::exception&) { if (!flush_error) { + // Even if we were unable to flush our dirty buffers + // let's free resources and close files to prevent server collapse flush_error = TRUE; + continue; } else { ERR_punt(); } } + } while (true); + }