mirror of
https://github.com/fbarresi/Sharp7.git
synced 2026-02-04 08:42:51 +00:00
added null propagation on disconnect method
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user