diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2020-09-23 12:43:27 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2020-10-01 06:36:52 +0200 |
commit | 88ba2fa7b414f3f63e66d1708f5bda9465e0ee89 (patch) | |
tree | 6de3e1602de4b73fd963627960f73180da0574b5 | |
parent | c186212a3075766717cab396a46242f110ee71bd (diff) |
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>
-rw-r--r-- | client.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |