We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d9d58e commit 7253b2bCopy full SHA for 7253b2b
session.go
@@ -4536,7 +4536,13 @@ func (iter *Iter) getMore() {
4536
} else {
4537
op = &iter.op
4538
}
4539
- if err := socket.Query(op); err != nil {
+ // We unlock the iterator around socket.Query because it will call the
4540
+ // replyFunc if the socket is dead, which would deadlock if the iterator
4541
+ // were still locked.
4542
+ iter.m.Unlock()
4543
+ err = socket.Query(op)
4544
+ iter.m.Lock()
4545
+ if err != nil {
4546
iter.docsToReceive--
4547
iter.err = err
4548
0 commit comments