Skip to content

Commit

Permalink
ensure heartbeating is setup following reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
grs committed Oct 29, 2019
1 parent 957728a commit f8d3865
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,10 @@ Connection.prototype.eof = function (e) {
};

Connection.prototype._disconnected = function (error) {
if (this.heartbeat_out) clearTimeout(this.heartbeat_out);
if (this.heartbeat_out) {
clearTimeout(this.heartbeat_out);
this.heartbeat_out = undefined;
}
if (this.heartbeat_in) clearTimeout(this.heartbeat_in);
var was_closed_with_non_fatal_error = this.closed_with_non_fatal_error;
if (this.closed_with_non_fatal_error) {
Expand Down

0 comments on commit f8d3865

Please sign in to comment.