fix: Send-Timeout für den HTTP-Server

This commit is contained in:
Michael Sauer
2026-09-11 23:03:01 +02:00
parent 15f709594b
commit c068156e6c
+1
View File
@@ -43,6 +43,7 @@ static void serve(int fd)
tv.tv_sec = 5;
tv.tv_usec = 0;
setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof tv);
while (pr == NL_HTTP_INCOMPLETE && len < sizeof s_buf) {
int n = recv(fd, s_buf + len, sizeof s_buf - len, 0);
if (n <= 0)