[vlc-devel] [PATCH 1/2] httpd: warn when an accept() failed even though it was signaled

Steve Lhomme robux4 at videolabs.io
Mon Nov 30 17:35:58 CET 2015


---
 src/network/httpd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index 7c924a8..cfaac4b 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -2038,7 +2038,10 @@ static void httpdLoop(httpd_host_t *host)
         /* */
         fd = vlc_accept (fd, NULL, NULL, true);
         if (fd == -1)
+        {
+            msg_Warn(host, "accept failed: %s", vlc_strerror_c(net_errno));
             continue;
+        }
         setsockopt (fd, SOL_SOCKET, SO_REUSEADDR,
                 &(int){ 1 }, sizeof(int));
 
-- 
2.6.3



More information about the vlc-devel mailing list