better server termination / another try at preventing thread join failures
This commit is contained in:
@ -135,6 +135,11 @@ namespace ix
|
||||
_conditionVariable.wait(lock);
|
||||
}
|
||||
|
||||
void SocketServer::stopAcceptingConnections()
|
||||
{
|
||||
_stop = true;
|
||||
}
|
||||
|
||||
void SocketServer::stop()
|
||||
{
|
||||
while (true)
|
||||
@ -270,6 +275,8 @@ namespace ix
|
||||
connectionState = _connectionStateFactory();
|
||||
}
|
||||
|
||||
if (_stop) return;
|
||||
|
||||
// Launch the handleConnection work asynchronously in its own thread.
|
||||
_connectionsThreads.push_back(std::make_pair(
|
||||
connectionState,
|
||||
|
Reference in New Issue
Block a user