Check Connection on Socket close

This commit is contained in:
Federico Barresi
2020-05-07 00:58:24 +02:00
parent e1486d646e
commit 0d8ea74071

View File

@@ -722,8 +722,11 @@ namespace Sharp7
} }
public int Disconnect() public int Disconnect()
{
if (Socket != null && Socket.Connected)
{ {
Socket.Close(); Socket.Close();
}
return 0; return 0;
} }