fix handing of return 0 from recv in new connections (fixes #506 ?)

This commit is contained in:
F. Duncanh
2026-03-20 14:50:45 -04:00
parent 3c953ef95c
commit d1490aa175

View File

@@ -489,7 +489,8 @@ httpd_thread(void *arg)
if (ret == 0) {
logger_log(httpd->logger, LOGGER_DEBUG, "client closed connection on socket %d",
connection->socket_fd);
break;
httpd_remove_connection(httpd, connection, 0);
continue;
} else if (ret == -1) {
if (errno == SOCKET_ERRORNAME(EAGAIN) || errno == SOCKET_ERRORNAME(EWOULDBLOCK) || errno == SOCKET_ERRORNAME(EINTR)) {
continue;