From 05c31da4d9cb23d8a9170410295849aad4bf290f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 13 Nov 2019 17:57:38 +0100 Subject: [PATCH] connectivity: don't cancel curl timerfunction from timeout Curl documents about CURLMOPT_TIMERFUNCTION: The timer_callback will only be called when the timeout expire time is changed. That means, we should not cancel the timeout when it happend, but only when the callback is called again (or during cleanup). See-also: https://curl.haxx.se/libcurl/c/CURLMOPT_TIMERFUNCTION.html --- src/nm-connectivity.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c index 8cf9f0bc56..b1311fbb70 100644 --- a/src/nm-connectivity.c +++ b/src/nm-connectivity.c @@ -408,10 +408,9 @@ _con_curl_timeout_cb (gpointer user_data) { NMConnectivityCheckHandle *cb_data = user_data; - cb_data->concheck.curl_timer = 0; _con_curl_check_connectivity (cb_data->concheck.curl_mhandle, CURL_SOCKET_TIMEOUT, 0); _complete_queued (cb_data->self); - return G_SOURCE_REMOVE; + return G_SOURCE_CONTINUE; } static int