summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-22 14:44:44 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-22 14:44:44 +0000
commita5a157f9dff6ff2e370e3f58d51badd6b9f039fe (patch)
treeb7f59dfffe3fccf1ce94ec019dec42aef6a394a5 /ext
parent6d777c1a1940facd0355937ca45d2efaf9d39c9b (diff)
* ext/socket/socket.c (ruby_connect): workaround for the setup of
Cygwin socket. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 87f7403226..a3c06d9ba9 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -756,6 +756,14 @@ ruby_connect(fd, sockaddr, len, socks)
case EAGAIN:
#ifdef EINPROGRESS
case EINPROGRESS:
+#if defined __CYGWIN__
+ {
+ struct timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 100000;
+ rb_thread_wait_for(&tv);
+ }
+#endif
#endif
thread_write_select(fd);
continue;