Skip to content

Commit

Permalink
fixes: destroy socket after idle timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
chradek authored and grs committed May 5, 2020
1 parent 97f78d2 commit 7a69a74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ Connection.prototype.abort_socket = function (socket) {
this.socket.removeAllListeners('data');
this.socket.removeAllListeners('error');
this.socket.removeAllListeners('end');
if (typeof this.socket.destroy === 'function') {
this.socket.destroy();
}
this._disconnected();
}
};
Expand Down

0 comments on commit 7a69a74

Please sign in to comment.