summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-22 09:00:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-22 09:00:23 +0000
commite6bf7809f399b4602c9b3a2aa4761da0e336fb83 (patch)
treea423ef967d835ff2af929f5912a7c4b66f96166e /win32/win32.c
parent7f16734d2722ae0a33125bac9c9de5a90dba3e83 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 22f3af9ed9..bd07bb644e 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1974,6 +1974,11 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
if (!NtSocketsInitialized++) {
StartSockets();
}
+ r = 0;
+ if (rd && rd->fd_count > r) r = rd->fd_count;
+ if (wr && wr->fd_count > r) r = wr->fd_count;
+ if (ex && ex->fd_count > r) r = ex->fd_count;
+ if (nfds > r) nfds = r;
if (nfds == 0 && timeout) {
Sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000);
return 0;