Proper connection timeouts

This commit is contained in:
2022-08-26 06:06:07 -05:00
parent 3cb29c6b76
commit 8c6b4b9f76
2 changed files with 3 additions and 2 deletions

View File

@@ -6,8 +6,8 @@ key domain.key 8001
cert domain.crt 8001
# Port 8001 can have TLS, but it's self signed and very bad.
timeout 200000 8000
timeout 200000 8001
timeout 20000 8000
timeout 20000 8001
# Set these values for the ports
set port 8000

View File

@@ -115,6 +115,7 @@ void runServer(int connfd, Sitefile *site, volatile int *pending, int id) {
if (conns.fds[i].revents & POLLIN) {
createFormatLog("Connection %d has data", i);
if (updateConnection(conns.conns + i, site)) {
freeConnection(conns.conns + i);
removeConnList(&conns, i);
--i;
}