Commit 19d4f6df authored by Eric Wong's avatar Eric Wong

interface: use a saner fdmax for select(2) when closing errored interfaces

git-svn-id: https://svn.musicpd.org/mpd/trunk@7218 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 232c9f6c
...@@ -462,7 +462,8 @@ static void closeNextErroredInterface(void) ...@@ -462,7 +462,8 @@ static void closeNextErroredInterface(void)
if (interfaces[i].fd >= 0) { if (interfaces[i].fd >= 0) {
FD_ZERO(&fds); FD_ZERO(&fds);
FD_SET(interfaces[i].fd, &fds); FD_SET(interfaces[i].fd, &fds);
if (select(FD_SETSIZE, &fds, NULL, NULL, &tv) < 0) { if (select(interfaces[i].fd + 1,
&fds, NULL, NULL, &tv) < 0) {
closeInterface(&interfaces[i]); closeInterface(&interfaces[i]);
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment