summaryrefslogtreecommitdiff
path: root/thread.c
diff options
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 7108f586af..927dbc4131 100644
--- a/thread.c
+++ b/thread.c
@@ -1151,6 +1151,7 @@ rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd)
val = func(data1);
saved_errno = errno;
}, ubf_select, th);
+ th->waiting_fd = -1;
errno = saved_errno;
return val;