Kill update request connections during deinit

Avoid leaving active requests on the HTTP server before shutting it down.
This commit is contained in:
Julien BLACHE 2010-07-30 21:42:53 +02:00
parent 51f879cb32
commit f6a9e1f7f4
2 changed files with 8 additions and 2 deletions

View File

@ -2875,7 +2875,10 @@ daap_deinit(void)
update_requests = ur->next; update_requests = ur->next;
if (ur->req->evcon) if (ur->req->evcon)
evhttp_connection_set_closecb(ur->req->evcon, NULL, NULL); {
evhttp_connection_set_closecb(ur->req->evcon, NULL, NULL);
evhttp_connection_free(ur->req->evcon);
}
free(ur); free(ur);
} }

View File

@ -1705,7 +1705,10 @@ dacp_deinit(void)
update_requests = ur->next; update_requests = ur->next;
if (ur->req->evcon) if (ur->req->evcon)
evhttp_connection_set_closecb(ur->req->evcon, NULL, NULL); {
evhttp_connection_set_closecb(ur->req->evcon, NULL, NULL);
evhttp_connection_free(ur->req->evcon);
}
free(ur); free(ur);
} }