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 6d98a66d6e..d3b875c78d 100644 --- a/ext/socket/init.c +++ b/ext/socket/init.c @@ -323,8 +323,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; |