From 932f1bfbbdff192e00f018cb7bface3fb2d1c27a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 12 Oct 2011 08:42:49 +0000 Subject: [PATCH] fixing #1824 --- src/daemon/daemon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 85bcd46f..1f6ca050 100644 --- 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