summaryrefslogtreecommitdiff
path: root/src/nm-connectivity.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-02-20 16:51:24 +0100
committerThomas Haller <thaller@redhat.com>2018-04-10 15:11:23 +0200
commite8e0ef6300526ab64eaba534c6b22b23631cf8a9 (patch)
tree2b0cb2ed504b242160cde5842accf0244c91aafe /src/nm-connectivity.c
parentd8a31794c8b9db243076ba0c24dfe6e496b78697 (diff)
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.
Diffstat (limited to 'src/nm-connectivity.c')
-rw-r--r--src/nm-connectivity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c
index dd11bdc0f..039ff71d0 100644
--- a/src/nm-connectivity.c
+++ b/src/nm-connectivity.c
@@ -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;