From f6a9e1f7f4eacbb9e3ee700be94ab5ea4c1954cf Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Fri, 30 Jul 2010 21:42:53 +0200 Subject: [PATCH] Kill update request connections during deinit Avoid leaving active requests on the HTTP server before shutting it down. --- src/httpd_daap.c | 5 ++++- src/httpd_dacp.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/httpd_daap.c b/src/httpd_daap.c index c7edf2f2..3bb23f2f 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -2875,7 +2875,10 @@ daap_deinit(void) update_requests = ur->next; 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); } diff --git a/src/httpd_dacp.c b/src/httpd_dacp.c index dad7c26b..39995652 100644 --- a/src/httpd_dacp.c +++ b/src/httpd_dacp.c @@ -1705,7 +1705,10 @@ dacp_deinit(void) update_requests = ur->next; 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); }