summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/basicsocket.c3
-rw-r--r--ext/socket/init.c2
-rw-r--r--ext/socket/udpsocket.c1
3 files changed, 1 insertions, 5 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index c1ae88d80cd..84ea2bb6bd2 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -558,8 +558,7 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
GetOpenFile(sock, fptr);
arg.fd = fptr->fd;
arg.flags = NUM2INT(flags);
- while (rb_thread_fd_writable(arg.fd),
- (n = (int)BLOCKING_REGION_FD(func, &arg)) < 0) {
+ while ((n = (int)BLOCKING_REGION_FD(func, &arg)) < 0) {
if (rb_io_wait_writable(arg.fd)) {
continue;
}
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 696b62d82ac..3960a23300c 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -130,7 +130,6 @@ rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
RBASIC(str)->klass = 0;
while (rb_io_check_closed(fptr),
- rb_thread_wait_fd(arg.fd),
(slen = BLOCKING_REGION_FD(recvfrom_blocking, &arg)) < 0) {
if (!rb_io_wait_readable(fptr->fd)) {
rb_sys_fail("recvfrom(2)");
@@ -560,7 +559,6 @@ rsock_s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len)
arg.sockaddr = sockaddr;
arg.len = len;
retry:
- rb_thread_wait_fd(fd);
fd2 = (int)BLOCKING_REGION_FD(accept_blocking, &arg);
if (fd2 < 0) {
switch (errno) {
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index 0ba4371f1a9..1b8756a9044 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -176,7 +176,6 @@ udp_send(int argc, VALUE *argv, VALUE sock)
retry:
arg.to = res->ai_addr;
arg.tolen = res->ai_addrlen;
- rb_thread_fd_writable(arg.fd);
n = (int)BLOCKING_REGION_FD(rsock_sendto_blocking, &arg);
if (n >= 0) {
freeaddrinfo(res0);