Skip to content

Commit 728c7df

Browse files
authored
revert: MGO-156 Avoid iter.Next deadlock on dead sockets (#182) (#188)
This reverts commit 7253b2b.
1 parent 8a9677c commit 728c7df

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

session.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4545,13 +4545,7 @@ func (iter *Iter) getMore() {
45454545
} else {
45464546
op = &iter.op
45474547
}
4548-
// We unlock the iterator around socket.Query because it will call the
4549-
// replyFunc if the socket is dead, which would deadlock if the iterator
4550-
// were still locked.
4551-
iter.m.Unlock()
4552-
err = socket.Query(op)
4553-
iter.m.Lock()
4554-
if err != nil {
4548+
if err := socket.Query(op); err != nil {
45554549
iter.docsToReceive--
45564550
iter.err = err
45574551
}

0 commit comments

Comments
 (0)