mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
Fixed AV on client : when disconnect happens while event callback run
This commit is contained in:
parent
22daf59b41
commit
682baeba6f
@ -3872,9 +3872,15 @@ FB_API_HANDLE& YEvents::getHandle()
|
|||||||
void YEvents::destroy(unsigned dstrFlags)
|
void YEvents::destroy(unsigned dstrFlags)
|
||||||
{
|
{
|
||||||
attachment->childEvents.remove(this);
|
attachment->childEvents.remove(this);
|
||||||
|
|
||||||
removeHandle(&events, handle);
|
removeHandle(&events, handle);
|
||||||
|
|
||||||
|
if (!(dstrFlags & DF_RELEASE))
|
||||||
|
{
|
||||||
|
const bool allowCancel = destroyed.compareExchange(0, 1);
|
||||||
|
if (!allowCancel)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
destroy2(dstrFlags);
|
destroy2(dstrFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user