nmcs-http: remove the timeout once expired

libcurl's documentation for CURLMOPT_TIMERFUNCTION requires the
application to install a non-repeating timer.

https://curl.haxx.se/libcurl/c/CURLMOPT_TIMERFUNCTION.html

So let's remove the GSource once expired.

Fixes: 69f048bf0c ('cloud-setup: add tool for automatic IP configuration in cloud')
(cherry picked from commit e09bd2339a)
This commit is contained in:
Antonio Cardace 2020-06-18 18:26:59 +02:00 committed by Thomas Haller
parent f5487645d8
commit b7d53f0d3a
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -657,7 +657,7 @@ static gboolean
_mhandle_timeout_cb (gpointer user_data)
{
_mhandle_action (user_data, CURL_SOCKET_TIMEOUT, 0);
return G_SOURCE_CONTINUE;
return G_SOURCE_REMOVE;
}
static int