Repository navigation
Fix reconnect loop leaving orphaned Ember+ clients - #132
Open
fredrikhareide wants to merge 1 commit into
Open
fredrikhareide wants to merge 1 commit into
fredrikhareide wants to merge 1 commit into
Conversation
Disable emberplus-connection's internal 5s auto-reconnect and handle retries in the module with exponential backoff (5s -> 60s, reset on connect). Stop discarded clients from retrying forever, and treat a connect() timeout (resolved Error) as a failure. Co-authored-by: Cursor <cursoragent@cursor.com>
2 tasks done
Collaborator
|
Thank you for this. I am working on some fixes for the ember plus library including its handling of reconnects and will see where that lands before merging. |
Collaborator
|
Can you please remove all the reconnect work from this PR now that it is in its own PR. Then I will merge this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the device is unreachable, or the host/port is changed while the module is still trying to connect, the old client never stops retrying. discard() doesn't stop emberplus-connection's own 5s reconnect when the socket never connected, so you end up with more and more clients hitting the old address in the background.
Added tests for the backoff and for stopping discarded clients.