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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index da764ca3..fcbfe105 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1770,8 +1770,9 @@ exit:
{
shutdown (con->socket_fd,
SHUT_WR);
- MHD_socket_close_chk_ (con->socket_fd);
- con->socket_fd = MHD_INVALID_SOCKET;
+ /* 'socket_fd' can be used in other thread to signal shutdown.
+ * To avoid data races, do not close socket here. Daemon will
+ * use more connections only after cleanup anyway. */
}
return (MHD_THRD_RTRN_TYPE_) 0;
}