Skip to content

Commit

Permalink
Improve reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Jul 14, 2017
1 parent 67be874 commit 80a3bc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ Stream.prototype.error = function (error) {

debug(error.message);
this.emit('error', error);
this.socket.close();
if (this.socket) this.socket.close();
this.closed();

return this;
};
Expand Down

0 comments on commit 80a3bc8

Please sign in to comment.