summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-04 05:32:09 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-04 05:32:09 +0000
commit1cd42f0ad48cfbcd44f6898eaf4ffbdbbec9b394 (patch)
treeddcda0d5d0fd36fbd07626ecdb600e45ad02bb39 /ext
parent396f148c2925c190331857d36c45d2c78e701bcf (diff)
* ext/socket/socket.c (ruby_connect): EALREADY is the equivalent
for EINPROGRESS in ws2_32.lib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 02c1096d69..1a78e6a816 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -761,6 +761,7 @@ ruby_connect(fd, sockaddr, len, socks)
#ifdef EINPROGRESS
case EINPROGRESS:
#if defined __CYGWIN__
+ case EALREADY:
wait_in_progress = 10;
#endif
#endif
@@ -768,9 +769,8 @@ ruby_connect(fd, sockaddr, len, socks)
continue;
#if defined __CYGWIN__
- case EALREADY:
case EINVAL:
- if (--wait_in_progress > 0) {
+ if (wait_in_progress-- > 0) {
struct timeval tv = {0, 100000};
rb_thread_wait_for(tv);
continue;