summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2020-09-23 12:43:27 +0200
committerRafał Miłecki <rafal@milecki.pl>2020-10-01 06:36:52 +0200
commit88ba2fa7b414f3f63e66d1708f5bda9465e0ee89 (patch)
tree6de3e1602de4b73fd963627960f73180da0574b5 /client.c
parentc186212a3075766717cab396a46242f110ee71bd (diff)
downloaduhttpd2-88ba2fa7b414f3f63e66d1708f5bda9465e0ee89.tar.gz
client: really close connection on timeout
After specified time of network inactivity uhttpd is meant to close connection. It doesn't seem to work thought. After timeout client doesn't receive any more data but connection it still opened. This change fixes that. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'client.c')
-rw-r--r--client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client.c b/client.c
index 2a2393f..b5736e4 100644
--- a/client.c
+++ b/client.c
@@ -95,7 +95,8 @@ static void client_timeout(struct uloop_timeout *timeout)
struct client *cl = container_of(timeout, struct client, timeout);
cl->state = CLIENT_STATE_CLOSE;
- uh_connection_close(cl);
+ cl->request.connection_close = true;
+ uh_request_done(cl);
}
static void uh_set_client_timeout(struct client *cl, int timeout)