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

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