Introduce protected member for Service auto connect cooldown max
Commit 0801d19 ("Throttle AutoConnect calls") introduces a
cooldown timeout max of 30 minutes for all services in order
to avoid a busy cycle that occurs on cellular devices when
Service::Connect fails. This poses a problem for jetstream
routers that are unable to acquire dhcp leases due to a downed
ISP server as they become defunct for 30 minutes and require
a power cycle. This change modifies the default timeout for
all services to be 1 minute and introduces a protected member,
max_auto_connect_cooldown_time_milliseconds_, which is
overridden to be the previous 30 minute value for cellular
services only.
BUG=b:27207845
TEST=Added log to Service::ThrottleFutureAutoConnects and
verified that net.log shows values reaching up to 1 minute on
veyron_minnie-cheets.
To test the cellular case, added conditional log to
Service::ThrottleFutureAutoConnects and verified that
max cooldown is set to the original 30 minutes on a link.
Change-Id: I142951a12ab00e8a963a60adda98d5e125f3f78b
Reviewed-on: https://chromium-review.googlesource.com/367500
Commit-Ready: Christopher Book <cbook@chromium.org>
Tested-by: Ian Wyszynski <wyszynski@google.com>
Reviewed-by: Ian Wyszynski <wyszynski@google.com>
Reviewed-by: Kevin Cernekee <cernekee@chromium.org>
5 files changed