aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-12 08:42:49 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-12 08:42:49 +0000
commit932f1bfbbdff192e00f018cb7bface3fb2d1c27a (patch)
tree49112d08e7089f00a02346da31cf8c20b615807f
parentda7e8ad76dcec43b011ea65a20b7b45608590f34 (diff)
downloadlibmicrohttpd-932f1bfbbdff192e00f018cb7bface3fb2d1c27a.tar.gz
libmicrohttpd-932f1bfbbdff192e00f018cb7bface3fb2d1c27a.zip
fixing #1824
-rw-r--r--src/daemon/daemon.c5
1 files 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,
948#if LINUX 948#if LINUX
949 { 949 {
950 /* non-blocking sockets perform better on Linux */ 950 /* non-blocking sockets perform better on Linux */
951 int flags = fcntl (fd, F_GETFL); 951 int flags = fcntl (connection->socket_fd, F_GETFL);
952 if ( (flags == -1) || 952 if ( (flags == -1) ||
953 (0 != fcntl (fd, F_SETFL, flags | O_NONBLOCK)) ) 953 (0 != fcntl (connection->socket_fd, F_SETFL, flags | O_NONBLOCK)) )
954 { 954 {
955#if HAVE_MESSAGES 955#if HAVE_MESSAGES
956 FPRINTF(stderr, "Failed to make socket non-blocking: %s\n", 956 FPRINTF(stderr, "Failed to make socket non-blocking: %s\n",
957 STRERROR (errno)); 957 STRERROR (errno));
958#endif 958#endif
959 } 959 }
960#endif
961 } 960 }
962#endif 961#endif
963 962