mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Plugin/Forward - autotune the dialTimeout for connection (#1852)
* - implement an auto-tunable dialTimeout for fallback. * - fix gofmt * - factorized timeout computation with readTimeout / updated readme / * - fix comment
This commit is contained in:
committed by
Miek Gieben
parent
6f865a9de7
commit
70c957d885
@@ -140,9 +140,9 @@ func TestCleanupAll(t *testing.T) {
|
||||
|
||||
tr := newTransport(s.Addr, nil /* no TLS */)
|
||||
|
||||
c1, _ := dns.DialTimeout("udp", tr.addr, dialTimeout)
|
||||
c2, _ := dns.DialTimeout("udp", tr.addr, dialTimeout)
|
||||
c3, _ := dns.DialTimeout("udp", tr.addr, dialTimeout)
|
||||
c1, _ := dns.DialTimeout("udp", tr.addr, defaultDialTimeout)
|
||||
c2, _ := dns.DialTimeout("udp", tr.addr, defaultDialTimeout)
|
||||
c3, _ := dns.DialTimeout("udp", tr.addr, defaultDialTimeout)
|
||||
|
||||
tr.conns["udp"] = []*persistConn{
|
||||
{c1, time.Now()},
|
||||
|
||||
Reference in New Issue
Block a user