Skip to content

Added callback to catch an error happening on the socket connection #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ElegantCrab
Copy link

@ElegantCrab ElegantCrab commented Apr 27, 2023

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.

@hasanuc20
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants