Skip to content

Commit

Permalink
Remove deadlines when handling PostgreSQL connections
Browse files Browse the repository at this point in the history
  • Loading branch information
rtribotte committed May 6, 2024
1 parent a415040 commit 15973f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/server/router/tcp/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 15973f5

Please sign in to comment.