Normalize timeout error when receiving pipeline results
https://github.com/jackc/pgx/issues/1748#issuecomment-1740437138
This commit is contained in:
+2
-1
@@ -1996,7 +1996,8 @@ func (p *Pipeline) GetResults() (results any, err error) {
|
|||||||
for {
|
for {
|
||||||
msg, err := p.conn.receiveMessage()
|
msg, err := p.conn.receiveMessage()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
p.conn.asyncClose()
|
||||||
|
return nil, normalizeTimeoutError(p.ctx, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch msg := msg.(type) {
|
switch msg := msg.(type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user