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
This commit is contained in:
Thomas Haller 2019-11-13 17:57:38 +01:00
parent ec868916c8
commit 05c31da4d9

View file

@ -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