SDK Client Disconnection Fixes

This commit is contained in:
B Horn
2022-06-12 04:43:15 +00:00
committed by Adam Honse
parent 003f4ba641
commit 937451d6e8
2 changed files with 11 additions and 9 deletions

View File

@@ -157,15 +157,15 @@ void NetworkClient::StartClient()
void NetworkClient::StopClient()
{
server_connected = false;
client_active = false;
if (server_connected)
if(server_connected)
{
shutdown(client_sock, SD_RECEIVE);
closesocket(client_sock);
}
client_active = false;
server_connected = false;
if(ListenThread)
{
ListenThread->join();