8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 02:03:04 +01:00

Fixed #7979: Hang when database with disconnect trigger using MON$ tables is shutting down

(cherry picked from commit 481863e632)
This commit is contained in:
AlexPeshkoff 2024-01-28 12:25:48 +03:00
parent 167dacc972
commit e81068d8f9

View File

@ -522,8 +522,6 @@ bool CCH_exclusive_attachment(thread_db* tdbb, USHORT level, SSHORT wait_flag, S
{
try
{
tdbb->checkCancelState(true);
bool found = false;
for (Jrd::Attachment* other_attachment = attachment->att_next; other_attachment;
other_attachment = other_attachment->att_next)
@ -574,6 +572,7 @@ bool CCH_exclusive_attachment(thread_db* tdbb, USHORT level, SSHORT wait_flag, S
if (remaining >= CCH_EXCLUSIVE_RETRY_INTERVAL)
{
SyncUnlockGuard unlock(exLock ? (*exGuard) : dsGuard);
tdbb->reschedule(true);
Thread::sleep(CCH_EXCLUSIVE_RETRY_INTERVAL * 1000);
}