+
+static void IOcurl_abort_shutdown_callback(struct ev_loop *loop, ev_cleanup *watcher, int revents)
+{
+ CURLMcode msta;
+ AsyncIO *IO = watcher->data;
+ EV_syslog(LOG_DEBUG, "EVENT Curl: %s\n", __FUNCTION__);
+
+ curl_slist_free_all(IO->HttpReq.headers);
+ msta = curl_multi_remove_handle(global.mhnd, IO->HttpReq.chnd);
+ if (msta)
+ EV_syslog(LOG_ERR, "EVCURL: warning problem detaching completed handle from curl multi: %s\n", curl_multi_strerror(msta));
+
+ curl_easy_cleanup(IO->HttpReq.chnd);
+ IO->HttpReq.chnd = NULL;
+ ev_cleanup_stop(event_base, &IO->abort_by_shutdown);
+ ev_io_stop(event_base, &IO->recv_event);
+ ev_io_stop(event_base, &IO->send_event);
+ assert(IO->ShutdownAbort);
+ IO->ShutdownAbort(IO);
+}