plugin/forward: remove dynamic read timeout (#2319)

* plugin/forward: remove dynamic read timeout

We care about an upstream being there, so we still have a dynamic dial
time out (by way higher then 200ms) of 1s; this should be fairly stable
for an upstream. The read timeout if more variable because of cached and
non cached responses. As such remove his logic entirely.

Drop to 2s read timeout.

Fixes #2306

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben 2018-11-20 08:48:56 +01:00 committed by GitHub
parent e94ce7a12a
commit a1d92c51cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 26 deletions

View file

@ -140,9 +140,9 @@ func TestCleanupAll(t *testing.T) {
tr := newTransport(s.Addr)
c1, _ := dns.DialTimeout("udp", tr.addr, defaultDialTimeout)
c2, _ := dns.DialTimeout("udp", tr.addr, defaultDialTimeout)
c3, _ := dns.DialTimeout("udp", tr.addr, defaultDialTimeout)
c1, _ := dns.DialTimeout("udp", tr.addr, maxDialTimeout)
c2, _ := dns.DialTimeout("udp", tr.addr, maxDialTimeout)
c3, _ := dns.DialTimeout("udp", tr.addr, maxDialTimeout)
tr.conns["udp"] = []*persistConn{
{c1, time.Now()},