connectivity: Make curl timeout callback non-repeating.
Summary
Make curl timeout callback non-repeating. Fixes reports of 100% CPU usage after upgrading to curl v8.4.0.
Purpose
The CURLMOPT_TIMERFUNCTION manual says: Your callback function timer_callback should install a non-repeating timer with an expire time of timeout_ms milliseconds.
The previous callback returned G_SOURCE_CONTINUE, resulting in a repeating firing callback. curl tweaked some internals in v8.4.0 and started giving 0 timeouts, which caused this to wreak havoc.
Fix it by making the callback non-repeating as specified by the API contract.
Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
-
the subject for all commits is concise and explicative -
the message for all commits explains the reason for the change -
the source is properly formatted -
any relevant documentation is up to date - N / A you have added unit tests if applicable