bsquare-corp / modbus-sphere-library

A Modbus Library and example code suitable for use on Microsoft Sphere devices. Supports Modbus TCP, Modbus RTU and Modbus RTU over TCP.
MIT License
9 stars 7 forks source link

Application will sometimes crash if TCP connected device is turned off #6

Closed glynj-bsquare closed 4 years ago

glynj-bsquare commented 4 years ago

If a TCP connected device is turned off, then the system reports this in the modbus library with: Error: EPOLLRDHUP or EPOLLHUP has returned true. Reconnect

Various other errors occur, then next time the application tries to perform a modbus command using the handle it crashes.