* fixed wrong select() call
authorWilfried Göesgens <willi@citadel.org>
Tue, 20 May 2008 06:49:02 +0000 (06:49 +0000)
committerWilfried Göesgens <willi@citadel.org>
Tue, 20 May 2008 06:49:02 +0000 (06:49 +0000)
webcit/webserver.c

index cccd0b6515616357c6a0cf46fdeb6584639c194e..7ff612a6954e82d72072c2e1115322a4f045fdfd 100644 (file)
@@ -287,7 +287,7 @@ ssize_t client_write(const void *buf, size_t count)
                 if ((fdflags & O_NONBLOCK) == O_NONBLOCK) {
                         FD_ZERO(&wset);
                         FD_SET(WC->http_sock, &wset);
-                        if (select(1, NULL, &wset, NULL, NULL) == -1) {
+                        if (select(WC->http_sock + 1, NULL, &wset, NULL, NULL) == -1) {
                                 lprintf(2, "client_write: Socket select failed (%s)\n", strerror(errno));
                                 return -1;
                         }