Merge branch 'js/maint-cvsexport' into maint
[gitweb.git] / http.c
diff --git a/http.c b/http.c
index 5925d07478b763ee9f91d7b273f64f0ae956219b..c7deccb6de6a8a57a2fb57734f05d6ffdc6ae9dc 100644 (file)
--- a/http.c
+++ b/http.c
@@ -281,23 +281,15 @@ void http_init(void)
 void http_cleanup(void)
 {
        struct active_request_slot *slot = active_queue_head;
-#ifdef USE_CURL_MULTI
-       char *wait_url;
-#endif
 
        while (slot != NULL) {
                struct active_request_slot *next = slot->next;
+               if (slot->curl != NULL) {
 #ifdef USE_CURL_MULTI
-               if (slot->in_use) {
-                       curl_easy_getinfo(slot->curl,
-                                         CURLINFO_EFFECTIVE_URL,
-                                         &wait_url);
-                       fprintf(stderr, "Waiting for %s\n", wait_url);
-                       run_active_slot(slot);
-               }
+                       curl_multi_remove_handle(curlm, slot->curl);
 #endif
-               if (slot->curl != NULL)
                        curl_easy_cleanup(slot->curl);
+               }
                free(slot);
                slot = next;
        }