plugin/forward: retry on cached tcp connection closed by peer (#1655)
* plugin/forward: retry on cached tcp connection closed by peer * fix linter warnings * fixed unit test * modify error message
This commit is contained in:
parent
848a5d7c79
commit
e46ee9d9cc
5 changed files with 40 additions and 20 deletions
|
@ -58,7 +58,7 @@ func (p *Proxy) SetTLSConfig(cfg *tls.Config) { p.transport.SetTLSConfig(cfg) }
|
|||
func (p *Proxy) SetExpire(expire time.Duration) { p.transport.SetExpire(expire) }
|
||||
|
||||
// Dial connects to the host in p with the configured transport.
|
||||
func (p *Proxy) Dial(proto string) (*dns.Conn, error) { return p.transport.Dial(proto) }
|
||||
func (p *Proxy) Dial(proto string) (*dns.Conn, bool, error) { return p.transport.Dial(proto) }
|
||||
|
||||
// Yield returns the connection to the pool.
|
||||
func (p *Proxy) Yield(c *dns.Conn) { p.transport.Yield(c) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue