connectivity: Make curl timeout callback non-repeating.

This reverts commit 05c31da4d9.

In the linked commit the callback was made repeating on the assumption
that forward progress would result in the callback getting canceled in
cb_data_complete. However, this assumption does not hold since a timeout
callback does not guarantee completion (or error out) of a request.

curl tweaked some internals in v8.4.0 and started giving 0 timeouts, and
a repeating callback is firing back-to-back without making any progress
in doing so.

Revert the change and make the callback non-repeating again.

Fixes: 05c31da4d9 ('connectivity: don't cancel curl timerfunction from timeout')
This commit is contained in:
Tatsuyuki Ishi 2023-10-13 16:46:09 +00:00 committed by Íñigo Huguet
parent 8316eb0303
commit abc6e1cf25

View file

@ -406,9 +406,10 @@ _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_CONTINUE;
return G_SOURCE_REMOVE;
}
static int