aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/microhttpd/daemon.c5
-rw-r--r--src/microhttpd/internal.h4
2 files changed, 6 insertions, 3 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. */
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index c0700ddf..286aee68 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1183,9 +1183,9 @@ struct MHD_Daemon
1183 unsigned int per_ip_connection_limit; 1183 unsigned int per_ip_connection_limit;
1184 1184
1185 /** 1185 /**
1186 * Daemon's options. 1186 * Daemon's flags (bitfield).
1187 */ 1187 */
1188 enum MHD_OPTION options; 1188 enum MHD_FLAG options;
1189 1189
1190 /** 1190 /**
1191 * Listen port. 1191 * Listen port.