added null propagation on disconnect method

This commit is contained in:
Federico Barresi
2020-06-05 17:40:57 +02:00
parent 602a8d4f36
commit c33a838144

View File

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