2
0

Normalize timeout error when receiving pipeline results

https://github.com/jackc/pgx/issues/1748#issuecomment-1740437138
This commit is contained in:
Jack Christensen
2023-09-30 08:50:40 -05:00
parent a61517a83b
commit 163eb68866
+2 -1
View File
@@ -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) {