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:
Eugen Kleiner
2018-05-09 14:41:14 +03:00
committed by Miek Gieben
parent 0e5e59c327
commit b9f0d55fc9
4 changed files with 16 additions and 11 deletions

View File

@@ -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
}