summaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index bcbe6b50..fcbf445a 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3782,7 +3782,18 @@ MHD_start_daemon_va (unsigned int flags,
free (daemon);
return NULL;
}
- make_nonblocking (daemon, daemon->wpipe[0]);
+ if (MHD_NO == make_nonblocking (daemon, daemon->wpipe[0]))
+ {
+#ifdef HAVE_MESSAGES
+ MHD_DLOG (daemon,
+ "Failed to make control pipe non-blocking: %s\n",
+ MHD_strerror_ (errno));
+#endif
+ MHD_pipe_close_ (daemon->wpipe[0]);
+ MHD_pipe_close_ (daemon->wpipe[1]);
+ free (daemon);
+ return NULL;
+ }
make_nonblocking (daemon, daemon->wpipe[1]);
}
#ifndef MHD_WINSOCK_SOCKETS