modbus-dart icon indicating copy to clipboard operation
modbus-dart copied to clipboard

Added callback to catch an error happening on the socket connection

Open ElegantCrab opened this issue 1 year ago • 1 comments

I was having a problem where, whenever I physically disconnected the device connected through the modbus protocol, I'd see an exception on the console but all subsequent petitions I had on a timer never returned thus never received any actual errors on my code and I couldn't recreate the connection.

This solves the issue by adding a callback right where the error is thrown so the user knows it happened and act accordingly.

ElegantCrab avatar Apr 27 '23 19:04 ElegantCrab

whenever i close my app. disconnects from my device. I can't connect to the device again. I guess because the query was interrupted. solution please.

hasanuc20 avatar Jun 01 '23 09:06 hasanuc20