aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/socket.c')
-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 5b7d8ebefb..8974096bbc 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -747,6 +747,7 @@ ruby_connect(fd, sockaddr, len, socks)
#ifdef EINPROGRESS
case EINPROGRESS:
#if defined __CYGWIN__
+ case EALREADY:
wait_in_progress = 10;
#endif
#endif
@@ -754,9 +755,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;