mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 07:23:03 +01:00
Attempt to fix bug CORE-3387 : Server and client are connected, but server not anwser to client and client is waiting indefinitively server answer !
This commit is contained in:
parent
05b503b52a
commit
9087961c15
@ -306,6 +306,7 @@ private:
|
||||
|
||||
void remove();
|
||||
void insert(const bool active);
|
||||
bool inList();
|
||||
static void wakeUpAll();
|
||||
|
||||
static Worker* m_activeWorkers;
|
||||
@ -5514,8 +5515,11 @@ Worker::Worker()
|
||||
Worker::~Worker()
|
||||
{
|
||||
Firebird::MutexLockGuard guard(m_mutex);
|
||||
remove();
|
||||
--m_cntAll;
|
||||
if (inList())
|
||||
{
|
||||
remove();
|
||||
--m_cntAll;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5528,7 +5532,9 @@ bool Worker::wait(int timeout)
|
||||
if (m_sem.tryEnter(0))
|
||||
return true;
|
||||
|
||||
fb_assert( inList() );
|
||||
remove();
|
||||
--m_cntAll;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -5624,6 +5630,11 @@ void Worker::insert(const bool active)
|
||||
fb_assert(m_activeWorkers == this);
|
||||
}
|
||||
|
||||
bool Worker::inList()
|
||||
{
|
||||
return m_next || m_prev || (m_idleWorkers == this) || (m_activeWorkers == this);
|
||||
}
|
||||
|
||||
void Worker::start(USHORT flags)
|
||||
{
|
||||
if (!isShuttingDown() && !wakeUp())
|
||||
|
Loading…
Reference in New Issue
Block a user