Skip to content

Commit

Permalink
Fix loading error when servers are in a particular unavailable state
Browse files Browse the repository at this point in the history
  • Loading branch information
MatrikMoon committed Jan 29, 2021
1 parent d91f98e commit f670ab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Shared/Sockets/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ private void ServerDisconnected_Internal()

public void Shutdown()
{
if (player.socket.Connected) player.socket.Shutdown(SocketShutdown.Both);
player.socket.Close();
if (Connected) player.socket?.Shutdown(SocketShutdown.Both);
player.socket?.Close();
}
}
}

0 comments on commit f670ab2

Please sign in to comment.