Skip to content

Commit

Permalink
revert: MGO-156 Avoid iter.Next deadlock on dead sockets (#182)
Browse files Browse the repository at this point in the history
This reverts commit 7253b2b.
  • Loading branch information
domodwyer committed Jun 11, 2018
1 parent abe06ac commit c82ee6f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -4545,13 +4545,7 @@ func (iter *Iter) getMore() {
} else {
op = &iter.op
}
// We unlock the iterator around socket.Query because it will call the
// replyFunc if the socket is dead, which would deadlock if the iterator
// were still locked.
iter.m.Unlock()
err = socket.Query(op)
iter.m.Lock()
if err != nil {
if err := socket.Query(op); err != nil {
iter.docsToReceive--
iter.err = err
}
Expand Down

0 comments on commit c82ee6f

Please sign in to comment.