From 15973f5503d07817ee9e0cf16f6b550c3be91a51 Mon Sep 17 00:00:00 2001 From: Romain Date: Mon, 6 May 2024 15:46:04 +0200 Subject: [PATCH] Remove deadlines when handling PostgreSQL connections --- pkg/server/router/tcp/router.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/server/router/tcp/router.go b/pkg/server/router/tcp/router.go index b4b7384d9..89096c7ca 100644 --- a/pkg/server/router/tcp/router.go +++ b/pkg/server/router/tcp/router.go @@ -123,6 +123,11 @@ func (r *Router) ServeTCP(conn tcp.WriteCloser) { } if postgres { + // Remove read/write deadline and delegate this to underlying TCP server. + if err := conn.SetDeadline(time.Time{}); err != nil { + log.Error().Err(err).Msg("Error while setting deadline") + } + r.servePostgres(r.GetConn(conn, getPeeked(br))) return }