Created
February 10, 2012 20:22
-
-
Save bnoordhuis/1792505 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/net.js b/lib/net.js | |
index f98bcfc..64c4dfd 100644 | |
--- a/lib/net.js | |
+++ b/lib/net.js | |
@@ -569,8 +569,7 @@ Socket.prototype.connect = function(port /* [host], [cb] */) { | |
// There are no event listeners registered yet so defer the | |
// error event to the next tick. | |
process.nextTick(function() { | |
- self.emit('error', err); | |
- self.destroy(); | |
+ self.destroy(err); | |
}); | |
} else { | |
timers.active(self); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment