mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-01 11:52:54 +01:00
#1372: Possible deadlock in SessionPool
This commit is contained in:
@@ -312,10 +312,15 @@ void SessionPool::onJanitorTimer(Poco::Timer&)
|
||||
|
||||
void SessionPool::shutdown()
|
||||
{
|
||||
Poco::Mutex::ScopedLock lock(_mutex);
|
||||
if (_shutdown) return;
|
||||
_shutdown = true;
|
||||
{
|
||||
Poco::Mutex::ScopedLock lock(_mutex);
|
||||
if (_shutdown) return;
|
||||
_shutdown = true;
|
||||
}
|
||||
|
||||
_janitorTimer.stop();
|
||||
|
||||
Poco::Mutex::ScopedLock lock(_mutex);
|
||||
closeAll(_idleSessions);
|
||||
closeAll(_activeSessions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user