8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 20:43:04 +01:00

Additional assertions related to the recent patch for bug CORE-6224

This commit is contained in:
hvlad 2020-03-04 17:11:54 +02:00
parent fd9dacaa3e
commit a9b049e04b

View File

@ -1153,6 +1153,11 @@ public:
// release reference that was created in constructor // release reference that was created in constructor
bool releasePort() bool releasePort()
{ {
Firebird::RefMutexEnsureUnlock portGuard(*port_sync, FB_FUNCTION);
const bool locked = portGuard.tryEnter();
fb_assert(locked);
fb_assert(!(port_flags & PORT_released));
if (port_flags & PORT_released) if (port_flags & PORT_released)
return false; return false;