diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-04-04 16:06:57 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-04-04 16:06:57 +0000 |
commit | f633852048e9bdcdfc440289069e6a21ec673326 (patch) | |
tree | 293d49a01fdbb848d3202d0a6ee0bd1329b06765 /src/microhttpd/daemon.c | |
parent | 47c6b680069bd2e0c174151d3078e60cc3b043d7 (diff) | |
download | libmicrohttpd-f633852048e9bdcdfc440289069e6a21ec673326.tar.gz libmicrohttpd-f633852048e9bdcdfc440289069e6a21ec673326.zip |
-fix minor type issue, and minor logging issue
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 5 |
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. */ |