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

fix: cleanup before new connection #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

fedor
Copy link

@fedor fedor commented Nov 21, 2016

@ceejbot,

Enables reuse of fivebeans handler.

Since I want to reuse the same fivebeans client object for reconnection, I call FiveBeansClient.prototype.connect() more than once.
As a result, a callback for an old socket may exist in self.handlers after a new socket is created. In this case, the first command with the new socket will stuck, because its callback will not be called (a callback for the old socket will be called instead).

Enables reuse of fivebeans handler.

Since I want to reuse the same fivebeans client object for reconnection, I call `FiveBeansClient.prototype.connect()` more than once.
As a result, a callback for an old socket may exist in `self.handlers` after a new socket is created. In this case, the first command with the new socket will stuck, because its callback will not be called (a callback for the old socket will be called instead).
@coveralls
Copy link

coveralls commented Nov 21, 2016

Coverage Status

Coverage decreased (-0.2%) to 92.857% when pulling f40fea7 on fedor:master into 1849d02 on ceejbot:master.

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.

None yet

2 participants