BlockingTCPTransportCodec::close() wait for threads

This commit is contained in:
Michael Davidsaver
2017-05-31 15:47:46 +02:00
parent 6ad8ba3ba2
commit 3ad27665e8
2 changed files with 10 additions and 0 deletions

View File

@@ -1032,6 +1032,12 @@ void BlockingTCPTransportCodec::close() {
// post close
internalPostClose(true);
// wait for threads
if(!_sendThread.isCurrentThread())
_sendThread.exitWait();
if(!_readThread.isCurrentThread())
_readThread.exitWait();
}
}