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>
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)