diff --git a/Sharp7/S7Client.cs b/Sharp7/S7Client.cs index 9215011..45a26ae 100644 --- a/Sharp7/S7Client.cs +++ b/Sharp7/S7Client.cs @@ -724,10 +724,7 @@ namespace Sharp7 public int Disconnect() { - if (Socket != null && Socket.Connected) - { - Socket.Close(); - } + Socket?.Close(); return 0; }