diff --git a/lib/srv/db/proxyserver.go b/lib/srv/db/proxyserver.go index 5bb8a993b35d1..3c277360bff00 100644 --- a/lib/srv/db/proxyserver.go +++ b/lib/srv/db/proxyserver.go @@ -210,7 +210,7 @@ func (s *ProxyServer) ServePostgres(listener net.Listener) error { go func() { defer clientConn.Close() err := s.PostgresProxy().HandleConnection(s.closeCtx, clientConn) - if err != nil { + if err != nil && !utils.IsOKNetworkError(err) { s.log.WithError(err).Warn("Failed to handle Postgres client connection.") } }() @@ -264,7 +264,9 @@ func (s *ProxyServer) serveGenericTLS(listener net.Listener, tlsConfig *tls.Conf defer clientConn.Close() tlsConn := tls.Server(clientConn, tlsConfig) if err := tlsConn.Handshake(); err != nil { - s.log.WithError(err).Errorf("%s TLS handshake failed.", dbName) + if !utils.IsOKNetworkError(err) { + s.log.WithError(err).Errorf("%s TLS handshake failed.", dbName) + } return } err := s.handleConnection(tlsConn)