mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:43:03 +01:00
Fixed possible deadlock between the shutting down engine and the running service. Reported by RedSoft.
This commit is contained in:
parent
9087961c15
commit
05c2144ac1
@ -6149,18 +6149,20 @@ static THREAD_ENTRY_DECLARE shutdown_thread(THREAD_ENTRY_PARAM arg)
|
||||
{
|
||||
ThreadContextHolder tdbb;
|
||||
|
||||
MutexLockGuard guard(databases_mutex);
|
||||
{ // scope
|
||||
MutexLockGuard guard(databases_mutex);
|
||||
|
||||
cancel_attachments();
|
||||
cancel_attachments();
|
||||
|
||||
Database* dbb_next;
|
||||
for (Database* dbb = databases; dbb; dbb = dbb_next)
|
||||
{
|
||||
dbb_next = dbb->dbb_next;
|
||||
if (!shutdown_dbb(tdbb, dbb))
|
||||
Database* dbb_next;
|
||||
for (Database* dbb = databases; dbb; dbb = dbb_next)
|
||||
{
|
||||
success = false;
|
||||
break;
|
||||
dbb_next = dbb->dbb_next;
|
||||
if (!shutdown_dbb(tdbb, dbb))
|
||||
{
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user