diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/init.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c index 9999c02969..53f946044a 100644 --- a/ext/socket/init.c +++ b/ext/socket/init.c @@ -314,8 +314,12 @@ wait_connectable(int fd) */ if (ret < 0) break; - if (sockerr == 0) - continue; /* workaround for winsock */ + if (sockerr == 0) { + if (revents & RB_WAITFD_OUT) + break; + else + continue; /* workaround for winsock */ + } /* BSD and Linux use sockerr. */ errno = sockerr; |