commit | bb499099049600074e3c4d7a5098b7c2be1ce9ab | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Fri Aug 28 19:18:42 2020 +0800 |
committer | Mike Yu <yumike@google.com> | Sat Sep 26 19:53:40 2020 +0800 |
tree | 20969d13d5e038c08d41c19553c3572fa5eedfc7 | |
parent | 1919271214cadbf65fcaf100f68c07d2839118f9 [diff] |
Make DoT retries configurable DnsTlsTransport re-issues pending queries when onClosed is called. The call to onClosed is triggered when 1) asynchronous handshake fails and 2) SSL socket idles for 20 seconds. In either case, retry on the same DoT server is not always a good solution. Instead, there are some considerable options, like trying next DoT server, fallbacking to Do53, or simply returning query failure. Tuning DoT retries is especially significant to asynchronous handshake feature because the timeout of the feature is calculated as: timeout = dot_connect_timeout_ms * dot_maxtries Bug: 149445907 Test: cd packages/modules/DnsResolver atest with combination of (dot_async_handshake, dot_maxtries) which are (0, 3), (0, 1), (1, 3), and (1, 1) Change-Id: Iceb7bc7f0f6736d900384d1a11eea470761ee32c
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.