Browse Source

Set SO_REUSEADDR on all sockets

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
341e41726f
  1. 2
      src/node_net.cc

2
src/node_net.cc

@ -74,6 +74,8 @@ static inline bool SetNonBlock(int fd) {
static inline bool SetSockFlags(int fd) {
int flags = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags));
return SetNonBlock(fd) && SetCloseOnExec(fd);
}

Loading…
Cancel
Save