servercontext wait for transport worker threads to finish

doing this through Transport::close()
causes deadlock in client code due to locking.
So make this an extra step.
This commit is contained in:
Michael Davidsaver
2017-06-26 14:16:41 +02:00
parent 3dca3dc38f
commit 0c02625aa5
4 changed files with 13 additions and 3 deletions

View File

@@ -375,6 +375,7 @@ void ServerContextImpl::destroyAllTransports()
for (size_t i = 0; i < size; i++)
{
const Transport::shared_pointer& transport = transports[i];
transport->waitJoin();
if(!transport.unique())
LOG(logLevelError, "Closed transport %s still has use_count=%u",
transport->getRemoteName().c_str(),