Remove deadlines when handling PostgreSQL connections
This commit is contained in:
parent
a4150409c8
commit
15973f5503
1 changed files with 5 additions and 0 deletions
|
@ -123,6 +123,11 @@ func (r *Router) ServeTCP(conn tcp.WriteCloser) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if postgres {
|
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)))
|
r.servePostgres(r.GetConn(conn, getPeeked(br)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue