Merge pull request #2225 from jlebon/pr/clear-timer

lib/fetch-curl: Unref timeout source
This commit is contained in:
OpenShift Merge Robot 2020-10-27 15:10:58 -04:00 committed by GitHub
commit 83eca85ad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -426,14 +426,11 @@ static gboolean
timer_cb (gpointer data)
{
OstreeFetcher *fetcher = data;
GSource *orig_src = fetcher->timer_event;
g_clear_pointer (&fetcher->timer_event, (GDestroyNotify)destroy_and_unref_source);
(void)curl_multi_socket_action (fetcher->multi, CURL_SOCKET_TIMEOUT, 0, &fetcher->curl_running);
check_multi_info (fetcher);
if (fetcher->timer_event == orig_src)
fetcher->timer_event = NULL;
return FALSE;
return G_SOURCE_REMOVE;
}
/* Update the event timer after curl_multi library calls */