| @@ -28,7 +28,7 @@ struct BridgeClientConnection; | |||||
| static BridgeClientConnection *connections[BRIDGE_NUM_PORTS] = {}; | static BridgeClientConnection *connections[BRIDGE_NUM_PORTS] = {}; | ||||
| static AudioIO *audioListeners[BRIDGE_NUM_PORTS] = {}; | static AudioIO *audioListeners[BRIDGE_NUM_PORTS] = {}; | ||||
| static std::thread serverThread; | static std::thread serverThread; | ||||
| static bool serverQuit; | |||||
| static bool serverRunning; | |||||
| struct BridgeClientConnection { | struct BridgeClientConnection { | ||||
| @@ -387,8 +387,8 @@ static void serverRun() { | |||||
| #endif | #endif | ||||
| // Accept clients | // Accept clients | ||||
| serverQuit = false; | |||||
| while (!serverQuit) { | |||||
| serverRunning = true; | |||||
| while (serverRunning) { | |||||
| int client = accept(server, NULL, NULL); | int client = accept(server, NULL, NULL); | ||||
| if (client < 0) { | if (client < 0) { | ||||
| // Wait a bit before attempting to accept another client | // Wait a bit before attempting to accept another client | ||||
| @@ -410,7 +410,7 @@ void bridgeInit() { | |||||
| } | } | ||||
| void bridgeDestroy() { | void bridgeDestroy() { | ||||
| serverQuit = true; | |||||
| serverRunning = false; | |||||
| serverThread.join(); | serverThread.join(); | ||||
| } | } | ||||