From 0ab8cfe6ad84afbeca3ed220d591b78cae90fcca Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 3 Mar 2015 02:28:52 -0800 Subject: [PATCH] Util: Fix SocketPoll on pthreads --- src/util/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/socket.h b/src/util/socket.h index c676fb737..c5c98a6a3 100644 --- a/src/util/socket.h +++ b/src/util/socket.h @@ -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;