-
Notifications
You must be signed in to change notification settings - Fork 17
Stop calling onClientError when disconnect is called #194
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
Conversation
Codecov Report
@@ Coverage Diff @@
## 4.x #194 +/- ##
==========================================
+ Coverage 99.36% 99.41% +0.05%
==========================================
Files 16 16
Lines 1721 1724 +3
Branches 458 458
==========================================
+ Hits 1710 1714 +4
+ Misses 11 10 -1
Continue to review full report at Codecov.
|
# Conflicts: # dist/kuzzle.js # dist/kuzzle.js.map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with the way this PR is implemented.
To me, this bug occurs because the close method does not do its job correctly, leaving the auto-reconnection process alive instead of stopping it.
Instead of adding additional complexity to the current state machine, I propose to keep a reference to the auto-reconnection setTimeout timer, and then having the close method use it to remove the timer from the event loop.
|
Note: the related issue will be fixed by another way when the network wrappers will be refactored. |
|
Ok, accepting this fix for now since it'll be implemented in a cleaner way later. |
Fix https://github.com/kuzzleio/sdk/issues/16