mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-04 15:21:12 +00:00
connectivity: reduce timeout for connectivity checks to 20 seconds
The main issue is that `nmcli networking connectivity check` uses nm_client_check_connectivity(), which has a timeout of 25 seconds. Using a timeout of 30 seconds server side, means that if the requests don't complete in time, the client side will time out and abort with a failure. That is not right. Fix that by using a shorter timeout server side. 20 seconds is still plenty for a small HTTP request. If the network takes longer than that, it's fair to call that LIMITED connectivity.
This commit is contained in:
parent
d8a31794c8
commit
e8e0ef6300
|
@ -500,7 +500,7 @@ nm_connectivity_check_start (NMConnectivity *self,
|
|||
curl_easy_setopt (ehandle, CURLOPT_INTERFACE, cb_data->ifspec);
|
||||
curl_multi_add_handle (priv->concheck.curl_mhandle, ehandle);
|
||||
|
||||
cb_data->timeout_id = g_timeout_add_seconds (30, _timeout_cb, cb_data);
|
||||
cb_data->timeout_id = g_timeout_add_seconds (20, _timeout_cb, cb_data);
|
||||
|
||||
_LOG2D ("start request to '%s'", priv->uri);
|
||||
return cb_data;
|
||||
|
|
Loading…
Reference in a new issue