cmd/pgproxy: fix client TLS handshake timeout
There is a 30-second timeout set on client TLS connections but the handshake was called on the wrong connection and so the timeout was never used in practice. Signed-off-by: Francois Marier <francois@fmarier.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
2f45a6a9d8
commit
ead5ce65a3
@@ -291,7 +291,7 @@ func (p *proxy) serve(sessionID int64, c net.Conn) error {
|
|||||||
Certificates: p.downstreamCert,
|
Certificates: p.downstreamCert,
|
||||||
MinVersion: tls.VersionTLS12,
|
MinVersion: tls.VersionTLS12,
|
||||||
})
|
})
|
||||||
if err = uptc.HandshakeContext(ctx); err != nil {
|
if err = s.HandshakeContext(ctx); err != nil {
|
||||||
p.errors.Add("client-tls", 1)
|
p.errors.Add("client-tls", 1)
|
||||||
return fmt.Errorf("client TLS handshake: %v", err)
|
return fmt.Errorf("client TLS handshake: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user