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
This commit is contained in:
parent
232c9f6c41
commit
19d4f6df18
|
@ -462,7 +462,8 @@ static void closeNextErroredInterface(void)
|
|||
if (interfaces[i].fd >= 0) {
|
||||
FD_ZERO(&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]);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue