Skip to content

Commit

Permalink
Normalize timeout error when receiving pipeline results
Browse files Browse the repository at this point in the history
  • Loading branch information
jackc committed Sep 30, 2023
1 parent a61517a commit 163eb68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pgconn/pgconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,8 @@ func (p *Pipeline) GetResults() (results any, err error) {
for {
msg, err := p.conn.receiveMessage()
if err != nil {
return nil, err
p.conn.asyncClose()
return nil, normalizeTimeoutError(p.ctx, err)
}

switch msg := msg.(type) {
Expand Down

0 comments on commit 163eb68

Please sign in to comment.