This commit is contained in:
Bluzume 2021-11-05 05:50:54 -04:00
parent b75121b54f
commit 9f26f1bd59

View file

@ -125,28 +125,16 @@ namespace HISP.Server
{ {
// HI1 Packets are terminates by 0x00 so we have to read until we receive that terminator // HI1 Packets are terminates by 0x00 so we have to read until we receive that terminator
if (isDisconnecting || ClientSocket == null) if (isDisconnecting ||
return; ClientSocket == null ||
ClientSocket.Poll(0, SelectMode.SelectRead) ||
if(ClientSocket.Poll(0, SelectMode.SelectRead)) !ClientSocket.Connected ||
e.SocketError != SocketError.Success)
{ {
Disconnect(); Disconnect();
return; return;
} }
if (!ClientSocket.Connected)
{
Disconnect();
return;
}
if (e.SocketError != SocketError.Success)
{
Disconnect();
return;
}
int availble = e.BytesTransferred; int availble = e.BytesTransferred;
if (availble >= 1) if (availble >= 1)
{ {