Proper connection timeouts
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user