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
5 changed files with 15 additions and 26 deletions

View File

@@ -11,8 +11,7 @@ import (
// Proxy defines an upstream host.
type Proxy struct {
avgRtt int64
fails uint32
fails uint32
addr string
@@ -32,7 +31,6 @@ func NewProxy(addr, trans string) *Proxy {
fails: 0,
probe: up.New(),
transport: newTransport(addr),
avgRtt: int64(maxTimeout / 2),
}
p.health = NewHealthChecker(trans)
runtime.SetFinalizer(p, (*Proxy).finalizer)