Skip to content
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

The node will sometimes not automatically reconnect correctly if connection fails/disconnection occurs #4

Open
nagisa opened this issue Sep 3, 2024 · 0 comments

Comments

@nagisa
Copy link
Contributor

nagisa commented Sep 3, 2024

I am seeing sometimes that the node provided by this project is stuck in "disconnected" state. I was not able to catch a moment to debug this quite yet, however.

But from a brief code review, I think I can see a few reasons why this may be happening:

  1. mowerConnection.getMowers() throws an exception → the connect method will terminate prematurely and not schedule a repeat attempt to connect;
  2. mowerConnection.activateRealtimeUpdates() throws an exception → similar outcome;
  3. Within automower-connect library itself, if checkClose fires, it will move on to re-establish the connection, but if this attempt throws an exception the loop to maintain a live websocket connection gets broken.

I believe solving 1 and 2 will largely solve 3 implicitly, but it may make sense to address all of these independently.

@nagisa nagisa changed the title The node will not automatically reconnect if connection fails/disconnection occurs The node will not automatically reconnect correctly if connection fails/disconnection occurs Sep 3, 2024
@nagisa nagisa changed the title The node will not automatically reconnect correctly if connection fails/disconnection occurs The node will sometimes not automatically reconnect correctly if connection fails/disconnection occurs Sep 3, 2024
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

No branches or pull requests

1 participant