Created
August 5, 2012 21:22
-
-
Save isaacs/3267178 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 61b103a..d6e3d5a 100644 | |
--- a/lib/net.js | |
+++ b/lib/net.js | |
@@ -926,8 +926,9 @@ function listen(self, address, port, addressType, backlog, fd) { | |
if (!self._handle) { | |
self._handle = createServerHandle(address, port, addressType, fd); | |
if (!self._handle) { | |
+ var error = errnoException(errno, 'listen'); | |
process.nextTick(function() { | |
- self.emit('error', errnoException(errno, 'listen')); | |
+ self.emit('error', error); | |
}); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment