commit 932f1bfbbdff192e00f018cb7bface3fb2d1c27a
parent da7e8ad76dcec43b011ea65a20b7b45608590f34
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 12 Oct 2011 08:42:49 +0000
fixing #1824
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
@@ -948,16 +948,15 @@ MHD_add_connection (struct MHD_Daemon *daemon,
#if LINUX
{
/* non-blocking sockets perform better on Linux */
- int flags = fcntl (fd, F_GETFL);
+ int flags = fcntl (connection->socket_fd, F_GETFL);
if ( (flags == -1) ||
- (0 != fcntl (fd, F_SETFL, flags | O_NONBLOCK)) )
+ (0 != fcntl (connection->socket_fd, F_SETFL, flags | O_NONBLOCK)) )
{
#if HAVE_MESSAGES
FPRINTF(stderr, "Failed to make socket non-blocking: %s\n",
STRERROR (errno));
#endif
}
-#endif
}
#endif