Remove deadlines when handling PostgreSQL connections

This commit is contained in:
Romain 2024-05-06 15:46:04 +02:00 committed by GitHub
parent a4150409c8
commit 15973f5503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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