Skip to content

Commit 01c0423

Browse files
author
Marius Elvert
committed
Fix internally cached NetworkStream not being reset
1 parent ab6308e commit 01c0423

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

S7.Net/PLC.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public void Close()
194194
if (tcpClient.Connected) tcpClient.Close();
195195
tcpClient = null; // Can not reuse TcpClient once connection gets closed.
196196
}
197+
_stream = null;
197198
}
198199

199200
private void AssertPduSizeForRead(ICollection<DataItem> dataItems)

0 commit comments

Comments
 (0)