mirror of https://github.com/lukechilds/node.git
Browse Source
This is the Node side of the fix for Node's cluster module on Windows. https://github.com/joyent/node/issues/7691 The other required part is https://github.com/joyent/libuv/pull/1384 Windows and Unix return certain socket errors (i.e. EADDRINUSE) at different times: bind on Windows, and listen on Unix. In an effort to hide this difference, libuv on Windows stores such errors in the bind_error field of uv_tcp_t, to defer raising it at listen time. This worked fine except for the case in which a socket is shared in a Node cluster and a bind error occurs. A previous attempt to fix this (archived-io.js-v0.10d1e6be1460
3da36fe00e
) was flawed becaused in an attempt to relay the error at the JS level it caused the master to start accepting connections. With this new approach, libuv itself is relaying the bind errors, providing for a uniform behavior of uv_tcp_listen. Reviewed-By: Fedor Indutny <fedor@indutny.com>
Alexis Campailla
11 years ago
committed by
Fedor Indutny
1 changed files with 1 additions and 17 deletions
Loading…
Reference in new issue