Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4c684971 authored by Mike Yu's avatar Mike Yu
Browse files

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
parent 549be5d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment