summaryrefslogtreecommitdiff
path: root/ext/socket/basicsocket.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-10 01:41:59 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-10 01:41:59 +0000
commit91987f6b047afba7ffe4852539a15c214bdf56ba (patch)
treecc96c5a96123040b97e60d3b4cb01feedffaa263 /ext/socket/basicsocket.c
parent7d59a9631405b68e7aec9dbcf5e513649b779ceb (diff)
* ext/socket/{basicksocket,init,udpsocket}.c: revert some parts of
r36944. it breaks mswin/mingw ruby and brought into many many crashes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/basicsocket.c')
-rw-r--r--ext/socket/basicsocket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index 84ea2bb..c1ae88d 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -558,7 +558,8 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
GetOpenFile(sock, fptr);
arg.fd = fptr->fd;
arg.flags = NUM2INT(flags);
- while ((n = (int)BLOCKING_REGION_FD(func, &arg)) < 0) {
+ while (rb_thread_fd_writable(arg.fd),
+ (n = (int)BLOCKING_REGION_FD(func, &arg)) < 0) {
if (rb_io_wait_writable(arg.fd)) {
continue;
}