Fix runtime error on linux with default Socket timeouts.

The default value for socket timeout API is 0 and not -1, so revert to that value to give the intended infinite timeout on all platforms.
This commit is contained in:
Serge Camille
2020-09-13 09:57:13 +02:00
parent af39659944
commit 12a2e3c0b1

View File

@@ -18,8 +18,8 @@ namespace S7.Net
private TcpClient? tcpClient;
private NetworkStream? _stream;
private int readTimeout = System.Threading.Timeout.Infinite;
private int writeTimeout = System.Threading.Timeout.Infinite;
private int readTimeout = 0; // default no timeout
private int writeTimeout = 0; // default no timeout
/// <summary>
/// IP address of the PLC