Util: Fix SocketPoll on pthreads

This commit is contained in:
Jeffrey Pfau 2015-03-03 02:28:52 -08:00
parent 9273a4ca72
commit 0ab8cfe6ad
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ static inline int SocketPoll(size_t nSockets, Socket* reads, Socket* writes, Soc
struct timeval tv;
tv.tv_sec = timeoutMillis / 1000;
tv.tv_usec = (timeoutMillis % 1000) * 1000;
int result = select(maxFd, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv);
int result = select(maxFd + 1, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv);
int r = 0;
int w = 0;
int e = 0;