diff options
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r-- | ext/socket/socket.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index c630a4b77d..197c8e79e8 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -535,14 +535,12 @@ thread_connect(fd, sockaddr, len, type) } if (status < 0) { switch (errno) { -#ifdef EINPROGRESS - case EINPROGRESS: #ifdef EAGAIN case EAGAIN: +#ifdef EINPROGRESS + case EINPROGRESS: #endif - FD_ZERO(&fds); - FD_SET(fd, &fds); - rb_thread_select(fd+1, 0, &fds, 0, 0); + rb_thread_fd_writable(fd); continue; #endif |