diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-03-26 10:39:07 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-03-26 10:39:07 +0000 |
commit | 19d4f6df18a448df7ca0a028c2f9470e56f9bd0f (patch) | |
tree | 9d89d67d9e7e27434c9f89bbca51557cc6071a45 /src/interface.c | |
parent | 232c9f6c41387bc3cf1c239e0ce4caafbbb76c67 (diff) | |
download | mpd-19d4f6df18a448df7ca0a028c2f9470e56f9bd0f.tar.gz mpd-19d4f6df18a448df7ca0a028c2f9470e56f9bd0f.tar.xz mpd-19d4f6df18a448df7ca0a028c2f9470e56f9bd0f.zip |
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
Diffstat (limited to 'src/interface.c')
-rw-r--r-- | src/interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c index 00e009307..9f0be0982 100644 --- a/src/interface.c +++ b/src/interface.c @@ -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; } |