From 8a3ed368af394b1510c9e57721e42b338976151e Mon Sep 17 00:00:00 2001 From: normal Date: Mon, 23 Jul 2018 01:07:41 +0000 Subject: [PATCH] Revert "thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls" This reverts commit r64017 (git commit 2ff85621690f4f5b0dff9226ac68418a950a6919). Nevermind, haven't had enough coffee, yet :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/thread.c b/thread.c index 7b8d87ca79..6181a75ae6 100644 --- a/thread.c +++ b/thread.c @@ -3965,6 +3965,15 @@ rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t * return 0; } + if (read) { + rb_fd_resize(max - 1, read); + } + if (write) { + rb_fd_resize(max - 1, write); + } + if (except) { + rb_fd_resize(max - 1, except); + } return do_select(max, read, write, except, timeout); }