mirror of https://git.kore.io/kore.git
set req->owner to NULL when the connection removes it.
This commit is contained in:
parent
543a329ef6
commit
facc8b9d6c
|
@ -333,9 +333,11 @@ kore_connection_remove(struct connection *c)
|
|||
kore_free(c->hdlr_extra);
|
||||
|
||||
#if !defined(KORE_NO_HTTP)
|
||||
for (req = TAILQ_FIRST(&(c->http_requests)); req != NULL; req = rnext) {
|
||||
for (req = TAILQ_FIRST(&(c->http_requests));
|
||||
req != NULL; req = rnext) {
|
||||
rnext = TAILQ_NEXT(req, olist);
|
||||
TAILQ_REMOVE(&(c->http_requests), req, olist);
|
||||
req->owner = NULL;
|
||||
req->flags |= HTTP_REQUEST_DELETE;
|
||||
http_request_wakeup(req);
|
||||
}
|
||||
|
|
|
@ -419,7 +419,8 @@ http_request_free(struct http_request *req)
|
|||
req->path = NULL;
|
||||
|
||||
TAILQ_REMOVE(&http_requests, req, list);
|
||||
TAILQ_REMOVE(&(req->owner->http_requests), req, olist);
|
||||
if (req->owner != NULL)
|
||||
TAILQ_REMOVE(&(req->owner->http_requests), req, olist);
|
||||
|
||||
for (hdr = TAILQ_FIRST(&(req->resp_headers)); hdr != NULL; hdr = next) {
|
||||
next = TAILQ_NEXT(hdr, list);
|
||||
|
|
Loading…
Reference in New Issue