Skip to content

Commit 7f58aa0

Browse files
committed
EphemeralSocket should be exclusive
... otherwise it doesn't play nicely with cluster. Similar: nodejs/node-v0.x-archive#8643
1 parent ba355ae commit 7f58aa0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/EphemeralSocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ EphemeralSocket.prototype._createSocket = function (callback) {
117117
this._socket.once('listening', function () {
118118
return callback();
119119
});
120-
this._socket.bind(0, null);
120+
this._socket.bind({ port: 0, exclusive: true }, null);
121121

122122
// Start timer, if we have a positive timeout
123123
if (this._socketTimeoutMsec > 0 && !this._socketTimer) {

0 commit comments

Comments
 (0)