mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
plugin/forward: expose TLSConfig and error messages to public (#1781)
* plugin/forward: expose TLSConfig and error messages to public * Add IsTLS() instead of TLSConfig()
This commit is contained in:
committed by
Miek Gieben
parent
0e5e59c327
commit
b9f0d55fc9
@@ -58,7 +58,7 @@ func (p *Proxy) Connect(ctx context.Context, state request.Request, forceTCP, me
|
||||
if err := conn.WriteMsg(state.Req); err != nil {
|
||||
conn.Close() // not giving it back
|
||||
if err == io.EOF && cached {
|
||||
return nil, errCachedClosed
|
||||
return nil, ErrCachedClosed
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
@@ -69,7 +69,7 @@ func (p *Proxy) Connect(ctx context.Context, state request.Request, forceTCP, me
|
||||
p.updateRtt(timeout)
|
||||
conn.Close() // not giving it back
|
||||
if err == io.EOF && cached {
|
||||
return nil, errCachedClosed
|
||||
return nil, ErrCachedClosed
|
||||
}
|
||||
return ret, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user