Check for local server before detecting devices from hardware

This commit is contained in:
Adam Honse
2020-06-27 17:32:01 -05:00
parent 199db16ec0
commit 8e89d82c24
2 changed files with 27 additions and 2 deletions

View File

@@ -32,6 +32,9 @@ NetworkClient::NetworkClient(std::vector<RGBController *>& control) : controller
port_num = OPENRGB_SDK_PORT;
server_connected = false;
server_controller_count = 0;
ListenThread = NULL;
ConnectionThread = NULL;
}
void NetworkClient::ClientInfoChanged()
@@ -122,7 +125,8 @@ void NetworkClient::StopClient()
shutdown(client_sock, SD_RECEIVE);
closesocket(client_sock);
ListenThread->join();
if(ListenThread)
ListenThread->join();
ConnectionThread->join();
/*-------------------------------------------------*\