diff options
author | Johan Euphrosine <proppy@aminche.com> | 2010-10-06 19:18:08 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-10-18 17:00:13 -0700 |
commit | 5d400cfd3a2a9faf27a88bf82f33a57f78fa65af (patch) | |
tree | ab61e24e11912ec517705ff945ec4250391151b5 /lib | |
parent | b14eeb3c1ec15d94d20da4deea853582482a47b0 (diff) | |
download | nodejs-5d400cfd3a2a9faf27a88bf82f33a57f78fa65af.tar.gz nodejs-5d400cfd3a2a9faf27a88bf82f33a57f78fa65af.tar.bz2 nodejs-5d400cfd3a2a9faf27a88bf82f33a57f78fa65af.zip |
net listen should emit eaddrinuse error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/net.js b/lib/net.js index 38ee1128e..3f75d16b4 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1189,10 +1189,13 @@ Server.prototype._startWatcher = function () { }; Server.prototype._doListen = function () { - listen(this.fd, this._backlog || 128); - this._startWatcher(); -}; - + try { + listen(this.fd, this._backlog || 128); + this._startWatcher(); + } catch (err) { + this.emit('error', err); + } +} Server.prototype.address = function () { |