aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-03-26 10:39:07 +0000
committerEric Wong <normalperson@yhbt.net>2008-03-26 10:39:07 +0000
commit19d4f6df18a448df7ca0a028c2f9470e56f9bd0f (patch)
tree9d89d67d9e7e27434c9f89bbca51557cc6071a45
parent232c9f6c41387bc3cf1c239e0ce4caafbbb76c67 (diff)
downloadmpd-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
-rw-r--r--src/interface.c3
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;
}