Skip to content

Instantly share code, notes, and snippets.

@isaacs isaacs/gist:3267178
Created Aug 5, 2012

What would you like to do?
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.