summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/thread.c b/thread.c
index 823ec03053..c94c10c417 100644
--- a/thread.c
+++ b/thread.c
@@ -3320,12 +3320,10 @@ rb_thread_wait_fd_rw(int fd, int read)
if (fd < 0) {
rb_raise(rb_eIOError, "closed stream");
}
- while (result <= 0) {
- result = rb_wait_for_single_fd(fd, events, NULL);
- if (result < 0) {
- rb_sys_fail(0);
- }
+ result = rb_wait_for_single_fd(fd, events, NULL);
+ if (result < 0) {
+ rb_sys_fail(0);
}
thread_debug("rb_thread_wait_fd_rw(%d, %s): done\n", fd, read ? "read" : "write");