This commit is contained in:
Christian Grothoff
2011-10-12 08:42:49 +00:00
parent da7e8ad76d
commit 932f1bfbbd
+2 -3
View File
@@ -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