Fix crash when player leaves

This commit is contained in:
Li 2022-09-05 15:13:14 +12:00
parent ed721b362e
commit 4b48db6b2a
5 changed files with 13 additions and 9 deletions

View file

@ -117,8 +117,12 @@ namespace HISP.Server
do
{
Socket eSocket = e.AcceptSocket;
if(eSocket != null)
new GameClient(eSocket);
if (eSocket == null)
return;
if (eSocket.RemoteEndPoint == null)
return;
new GameClient(eSocket);
e.AcceptSocket = null;
if(GameServer.ServerSocket == null)