aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/daemon.c')
-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