From 01c0423d14609c138e4aa3b9ab5c8e046ccfb31c Mon Sep 17 00:00:00 2001 From: Marius Elvert Date: Tue, 14 May 2024 11:48:30 +0200 Subject: [PATCH] Fix internally cached NetworkStream not being reset --- S7.Net/PLC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/S7.Net/PLC.cs b/S7.Net/PLC.cs index 35d038e0..3ba49610 100644 --- a/S7.Net/PLC.cs +++ b/S7.Net/PLC.cs @@ -194,6 +194,7 @@ public void Close() if (tcpClient.Connected) tcpClient.Close(); tcpClient = null; // Can not reuse TcpClient once connection gets closed. } + _stream = null; } private void AssertPduSizeForRead(ICollection dataItems)