diff --git a/src/yvalve/why.cpp b/src/yvalve/why.cpp index e0a096f2a5..1bb191e629 100644 --- a/src/yvalve/why.cpp +++ b/src/yvalve/why.cpp @@ -3673,15 +3673,6 @@ ISC_STATUS API_ROUTINE isc_unwind_request(ISC_STATUS* userStatus, isc_req_handle // Shutdown firebird. int API_ROUTINE fb_shutdown(unsigned int timeout, const int reason) { - if (reason == fb_shutrsn_emergency) - { - shutdownStarted = true; - abortShutdown(); - } - - if (shutdownStarted) - return FB_SUCCESS; - StatusVector status(NULL); CheckStatusWrapper statusWrapper(&status); @@ -6422,6 +6413,10 @@ YService* Dispatcher::attachServiceManager(CheckStatusWrapper* status, const cha void Dispatcher::shutdown(CheckStatusWrapper* userStatus, unsigned int timeout, const int reason) { + // set "process exiting" state + if (reason == fb_shutrsn_emergency) + abortShutdown(); + // can't syncronize with already killed threads, just exit if (MasterInterfacePtr()->getProcessExiting()) return;