aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index bdf08e00..0261c228 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1884,6 +1884,9 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
1884#if HAVE_MESSAGES 1884#if HAVE_MESSAGES
1885 const int err = MHD_socket_errno_; 1885 const int err = MHD_socket_errno_;
1886 /* This could be a common occurance with multiple worker threads */ 1886 /* This could be a common occurance with multiple worker threads */
1887 if ( (EINVAL == err) &&
1888 (MHD_INVALID_SOCKET == daemon->socket_fd) )
1889 return MHD_NO; /* can happen during shutdown */
1887 if ((EAGAIN != err) && (EWOULDBLOCK != err)) 1890 if ((EAGAIN != err) && (EWOULDBLOCK != err))
1888 MHD_DLOG (daemon, 1891 MHD_DLOG (daemon,
1889 "Error accepting connection: %s\n", 1892 "Error accepting connection: %s\n",
@@ -3514,7 +3517,7 @@ MHD_start_daemon_va (unsigned int flags,
3514#endif 3517#endif
3515 daemon->socket_fd = MHD_INVALID_SOCKET; 3518 daemon->socket_fd = MHD_INVALID_SOCKET;
3516 daemon->listening_address_reuse = 0; 3519 daemon->listening_address_reuse = 0;
3517 daemon->options = (enum MHD_OPTION) flags; 3520 daemon->options = flags;
3518#if WINDOWS 3521#if WINDOWS
3519 /* Winsock is broken with respect to 'shutdown'; 3522 /* Winsock is broken with respect to 'shutdown';
3520 this disables us calling 'shutdown' on W32. */ 3523 this disables us calling 'shutdown' on W32. */