2
0

ReceiveMessage returns context error instead of io error on cancel

This commit is contained in:
Jack Christensen
2019-08-22 20:11:27 -05:00
parent 11255efe7a
commit 1558987979
+3
View File
@@ -361,6 +361,9 @@ func (pgConn *PgConn) ReceiveMessage(ctx context.Context) (pgproto3.BackendMessa
defer pgConn.contextWatcher.Unwatch()
msg, err := pgConn.receiveMessage()
if err != nil {
err = linkErrors(ctx.Err(), err)
}
return msg, err
}