From: Rafał Miłecki Date: Wed, 23 Sep 2020 10:43:27 +0000 (+0200) Subject: client: really close connection on timeout X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=88ba2fa7b414f3f63e66d1708f5bda9465e0ee89;p=project%2Fuhttpd.git 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 --- 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)