diff --git a/lib/net.js b/lib/net.js index 61b103a85da..d6e3d5adae1 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; }