fivebeans icon indicating copy to clipboard operation
fivebeans copied to clipboard

fix: cleanup before new connection

Open fedor opened this issue 9 years ago • 1 comments

@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).

fedor avatar Nov 21 '16 15:11 fedor

Coverage Status

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

coveralls avatar Nov 21 '16 15:11 coveralls