Преглед изворни кода

avoid log message on EOPNOTSUPP for UNIX domain sockets, as suggested by Markus

Christian Grothoff пре 6 година
родитељ
комит
dab960711f
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/microhttpd/daemon.c

+ 3 - 2
src/microhttpd/daemon.c

@@ -3259,8 +3259,9 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
 #if defined(MHD_TCP_CORK_NOPUSH) || defined(HAVE_MSG_MORE)
   /* We will use TCP_CORK or TCP_NOPUSH or MSG_MORE to control
      transmission, disable Nagle's algorithm (always) */
-  if (0 != MHD_socket_set_nodelay_ (s,
-                                    true))
+  if ( (0 != MHD_socket_set_nodelay_ (s,
+                                      true)) &&
+       (EOPNOTSUPP != errno) )
   {
 #ifdef HAVE_MESSAGES
     MHD_DLOG (daemon,