modbus icon indicating copy to clipboard operation
modbus copied to clipboard

How to tell if server closes the connection?

Open Prushka opened this issue 1 year ago • 0 comments

In my test, once the server forces a disconnection, the local conn will still be set and all client operations will fail. mb.connect() doesn't get triggered in this case.

I couldn't find anything regarding this in the library. I had to check client calls for errors and manually close and connect. Is this intended? Is there a better way to achieve this (e.g., check for broken pipe errors and reconnect)?

Prushka avatar Aug 08 '22 16:08 Prushka