Skip to content

Commit

Permalink
Fixed disconnection problem when calling StopClient().
Browse files Browse the repository at this point in the history
this was caused because the transport was invoking OnClientDisconnect() uppon disconnecting (which calls StopClient() again).
  • Loading branch information
Raystorms committed Jul 16, 2019
1 parent 1c69d35 commit 4c6d23e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ public async void Disconnect()
if (!Disconnected)
{
SendInternal(hostSteamID, disconnectMsgBuffer);
Disconnected = true;

state = ConnectionState.DISCONNECTED;
cancelToken.Cancel();

//Wait a short time before calling steams disconnect function so the message has time to go out
Expand Down

0 comments on commit 4c6d23e

Please sign in to comment.