From d2ea952b603c504aa54aa8bd390d8b4f74f65502 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 15 Aug 2007 08:42:54 +0000 Subject: [PATCH] fix --- src/daemon/daemon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index ac326b83..607f544b 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -438,8 +438,9 @@ MHD_select (struct MHD_Daemon *daemon, int may_block) { /* accept only, have one thread per connection */ max = daemon->socket_fd; - if (max != -1) - FD_SET (max, &rs); + if (max == -1) + return MHD_NO; + FD_SET (max, &rs); } if (may_block == MHD_NO) { timeout.tv_usec = 0;