diff options
author | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2023-10-13 16:46:09 +0000 |
---|---|---|
committer | Íñigo Huguet <ihuguet@redhat.com> | 2023-10-24 13:18:03 +0200 |
commit | 4731bf7af3818d412c38c597ec79d502ebb9459d (patch) | |
tree | e19054b15c04fdb4082193db140b0359ce5f1df8 | |
parent | 8316eb0303802f6bd9b7a8ed9786ea0251e18cac (diff) |
connectivity: Make curl timeout callback non-repeating.merge-requests/1756
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: 3b0256480131 ('connectivity: Make curl timeout callback non-repeating.')
-rw-r--r-- | src/core/nm-connectivity.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c index 92de44f17d..d8b0004c38 100644 --- a/src/core/nm-connectivity.c +++ b/src/core/nm-connectivity.c @@ -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 |