diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c index f66e6ae45f..14151811ba 100644 --- a/src/libostree/ostree-fetcher-curl.c +++ b/src/libostree/ostree-fetcher-curl.c @@ -386,6 +386,8 @@ update_timeout_cb (CURLM *multi, long timeout_ms, void *userp) { OstreeFetcher *fetcher = userp; + if (fetcher->timer_event) + g_source_destroy (fetcher->timer_event); fetcher->timer_event = g_timeout_source_new (timeout_ms); g_source_set_callback (fetcher->timer_event, timer_cb, fetcher, NULL); g_source_attach (fetcher->timer_event, fetcher->mainctx);