diff --git a/lib/net.js b/lib/net.js index 85479412b2d..bdd5ba8fadc 100644 --- a/lib/net.js +++ b/lib/net.js @@ -570,6 +570,7 @@ Socket.prototype.connect = function(port /* [host], [cb] */) { // error event to the next tick. process.nextTick(function() { self.emit('error', err); + self.destroy(); }); } else { timers.active(self);