8
0
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:
hvlad 2011-04-15 12:02:46 +00:00
parent 05b503b52a
commit 9087961c15

View File

@ -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())