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

@ -86,12 +86,12 @@ void StreamSession::stop()
}
if (readerThread_ && readerThread_->joinable())
{
LOG(DEBUG) << "joining readerThread\n";
LOG(DEBUG) << "StreamSession joining readerThread\n";
readerThread_->join();
}
if (writerThread_ && writerThread_->joinable())
{
LOG(DEBUG) << "joining writerThread\n";
LOG(DEBUG) << "StreamSession joining writerThread\n";
messages_.abort_wait();
writerThread_->join();
}