Skip to content

Commit f8d3865

Browse files
committed
ensure heartbeating is setup following reconnect
1 parent 957728a commit f8d3865

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/connection.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,10 @@ Connection.prototype.eof = function (e) {
545545
};
546546

547547
Connection.prototype._disconnected = function (error) {
548-
if (this.heartbeat_out) clearTimeout(this.heartbeat_out);
548+
if (this.heartbeat_out) {
549+
clearTimeout(this.heartbeat_out);
550+
this.heartbeat_out = undefined;
551+
}
549552
if (this.heartbeat_in) clearTimeout(this.heartbeat_in);
550553
var was_closed_with_non_fatal_error = this.closed_with_non_fatal_error;
551554
if (this.closed_with_non_fatal_error) {

0 commit comments

Comments
 (0)