From 323684efff28c9d4393b994780599479b7f1ec38 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Mon, 22 Apr 2019 09:36:16 -0700 Subject: [PATCH] (server) attempt to fix broken macOS unittest on travis CI --- ixwebsocket/IXSocketServer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ixwebsocket/IXSocketServer.cpp b/ixwebsocket/IXSocketServer.cpp index 63b2ed1f..eb8d8ed6 100644 --- a/ixwebsocket/IXSocketServer.cpp +++ b/ixwebsocket/IXSocketServer.cpp @@ -181,14 +181,13 @@ namespace ix auto& connectionState = it->first; auto& thread = it->second; - if (!connectionState->isTerminated() || - !thread.joinable()) + if (!connectionState->isTerminated()) { ++it; continue; } - thread.join(); + if (thread.joinable()) thread.join(); it = _connectionsThreads.erase(it); } }