Make max_idle_timeout configurable
Add a new flag, doh_idle_timeout_ms, so as to configure the QUIC
transport parameter max_idle_timeout.
Like the other flags, the DnsResolver doesn't use the new timeout
immediately until either createNetworkCache() or destroyNetworkCache()
is called.
After the DnsResolver starts using the new timeout, the new timeout
will be applied to new networks. The existing networks will still use
the old timeout before users change private DNS settings.
Bug: 205922706
Test: cd packages/modules/DnsResolver && atest
Test: 1. Turned on mobile data and sent some DoH queries
2. Set doh_idle_timeout_ms to 5000
3. Turned on/off wifi to make the flag effective
4. Checked that DnsResolve is using default timeout on the
cellular network.
5. Change private DNS settings
6. Checked that DnsResolver started using 5000ms for new
DoH connections on the cellular network.
Change-Id: I29997164067c190f6e1d07b5815e2170ef425ddb
Loading
Please register or sign in to comment