Commit e440b165 authored by Andreas Müller's avatar Andreas Müller
Browse files

Using IOException instead of EndOfStreamException to catch all connection loss (on Unix).

parent fe1f4f3e
Pipeline #127 passed with stages
in 48 seconds
# CHANGELOG
-----------
**Note:** I'll try to keep the changelog up-to-date, but please be patient, I might forget it.
----
## 1.0.1 (2020-11-30)
### Fixed (1 change)
- The Modbus TCP client on unix systems creates an `IOException` on connection loss - catch that exception instead of the `EndOfStreamException`.
## 1.0.0 (2020-11-28)
### Fixed (3 changes)
......
......@@ -1286,7 +1286,7 @@ namespace AMWD.Modbus.Tcp.Client
// Receive loop stopping
throw;
}
catch (EndOfStreamException)
catch (IOException)
{
if (!isReconnecting)
ConnectingTask = Task.Run(async () => await Reconnect());
......
......@@ -650,7 +650,7 @@ namespace AMWD.Modbus.Tcp.Server
}
}
}
catch (EndOfStreamException)
catch (IOException)
{
// client connection closed
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment