diff --git a/src/http.c b/src/http.c index 2fd831a..2fe52b3 100644 --- a/src/http.c +++ b/src/http.c @@ -246,10 +246,13 @@ http_process(void) else r = hdlr(req); - if (r != KORE_RESULT_ERROR) + if (r != KORE_RESULT_ERROR) { net_send_flush(req->owner); - else + if (req->owner->proto == CONN_PROTO_HTTP) + kore_server_disconnect(req->owner); + } else { kore_server_disconnect(req->owner); + } TAILQ_REMOVE(&http_requests, req, list); http_request_free(req);