diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-28 09:56:45 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-28 09:56:45 +0000 |
commit | 16732201b2e5fe58087c2d303e773cc5e915cb6d (patch) | |
tree | abd274e9c47df52a26ccefc562296543a739d755 /ext/socket | |
parent | 1059c9e00c0474d8ca38b58ab1317110e20aa1ce (diff) |
* ext/socket/socket.c (init_inetsock_internal): remove setting
SO_REUSEADDR option on server socket on Cygwin.
fixed: [ruby-core:6765] ([ ruby-Bugs-2872 ])
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 0a9cf30784..db70341e54 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1097,6 +1097,11 @@ init_inetsock_internal(arg) } arg->fd = fd; if (type == INET_SERVER) { +#if !defined(_WIN32) && !defined(__CYGWIN__) + status = 1; + setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, + (char*)&status, sizeof(status)); +#endif status = bind(fd, res->ai_addr, res->ai_addrlen); syscall = "bind(2)"; } |