Util: Fix highest-fd socket not being returned by SocketAccept
Vicki Pfau vi@endrift.com
Tue, 07 Feb 2017 13:19:45 -0800
2 files changed,
3 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -11,6 +11,7 @@ - Util: Fix overflow when loading invalid UPS patches
- GB: Fix crash when patching ROMs - Tools: Fix recurring multiple times over the same library - GBA I/O: Handle audio registers specially when deserializing + - Util: Fix highest-fd socket not being returned by SocketAccept Misc: - Qt: Improved HiDPI support - Feature: Support ImageMagick 7
M
src/util/socket.h
→
src/util/socket.h
@@ -291,10 +291,11 @@ FD_SET(errors[i], &eset);
errors[i] = INVALID_SOCKET; } } + ++maxFd; struct timeval tv; tv.tv_sec = timeoutMillis / 1000; tv.tv_usec = (timeoutMillis % 1000) * 1000; - int result = select(maxFd + 1, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv); + int result = select(maxFd, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv); int r = 0; int w = 0; int e = 0;