Commit e124243f authored by Lorn Potter's avatar Lorn Potter

[connman] make the ipv4 online check try harder.

Increase the interval exponentially up tp 10 minutes.
parent 4f027be9
......@@ -5829,22 +5829,25 @@ int __connman_service_online_check_failed(struct connman_service *service,
{
DBG("service %p type %d count %d", service, type,
service->online_check_count);
int timeout = 0;
if (service->online_check_count != 1) {
if (service->online_check_count < 1) {
connman_warn("Online check failed for %p %s", service,
service->name);
return 0;
}
service->online_check_count = 0;
--service->online_check_count;
/*
* We set the timeout to 1 sec so that we have a chance to get
* necessary IPv6 router advertisement messages that might have
* DNS data etc.
*/
timeout = 12 - service->online_check_count;
if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
g_timeout_add_seconds(1, redo_wispr_ipv4, service);
g_timeout_add_seconds(timeout * timeout, redo_wispr_ipv4, service);
} else {
g_timeout_add_seconds(1, redo_wispr, service);
}
......@@ -5898,7 +5901,7 @@ int __connman_service_ipconfig_indicate_state(struct connman_service *service,
update_nameservers(service);
if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
service->online_check_count = 1;
service->online_check_count = 12;//this works out to be about 10 minutes total
check_proxy_setup(service);
service_rp_filter(service, TRUE);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment