fix rare deadlock

in case of pending control request for ungraceful disconnected clients
This commit is contained in:
badaix 2018-07-03 22:52:39 +02:00
parent e7e529c818
commit 297d74aae9
3 changed files with 33 additions and 27 deletions

View file

@ -68,12 +68,12 @@ void ControlSession::stop()
}
if (readerThread_.joinable())
{
LOG(DEBUG) << "joining readerThread\n";
LOG(DEBUG) << "ControlSession joining readerThread\n";
readerThread_.join();
}
if (writerThread_.joinable())
{
LOG(DEBUG) << "joining writerThread\n";
LOG(DEBUG) << "ControlSession joining writerThread\n";
messages_.abort_wait();
writerThread_.join();
}
@ -82,7 +82,7 @@ void ControlSession::stop()
{
}
socket_ = NULL;
LOG(DEBUG) << "ControlSession stopped\n";
LOG(DEBUG) << "ControlSession ControlSession stopped\n";
}