diff --git a/lib/connection.js b/lib/connection.js index 4eabd309..ed6407ee 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -309,6 +309,7 @@ Connection.prototype._onSocketClose = function() { // error - error that has occured // Connection.prototype._onSocketError = function(error) { + this._end(); this.emit('error', error, this); };