Fix fastpath / largeobjects query counting
fastpath.Call was not incrementing pendingReadyForQueryCount when it sent a function call. But it was being decremented when the function call was finished and the server sent the ready for query message. This caused pendingReadyForQueryCount to go negative. This meant that any subsequent activity that depended on ensureConnectionReadyForQuery would not operate correctly because the connection would be considered ready before it had read all previous data off the wire. fixes #403
This commit is contained in:
@@ -76,6 +76,8 @@ func (f *fastpath) Call(oid pgtype.OID, args []fpArg) (res []byte, err error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
f.cn.pendingReadyForQueryCount++
|
||||
|
||||
for {
|
||||
msg, err := f.cn.rxMsg()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user