File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2964,8 +2964,10 @@ func (iter *Iter) Close() error {
29642964 iter .op .cursorId = 0
29652965 err := iter .err
29662966 iter .m .Unlock ()
2967-
29682967 if cursorId == 0 {
2968+ if err == ErrNotFound {
2969+ return nil
2970+ }
29692971 return err
29702972 }
29712973 socket , err := iter .acquireSocket ()
@@ -3238,7 +3240,7 @@ func (iter *Iter) getMore() {
32383240 debugf ("Iter %p requesting more documents" , iter )
32393241 if iter .limit > 0 {
32403242 // The -1 below accounts for the fact docsToReceive was incremented above.
3241- limit := iter .limit - int32 (iter .docsToReceive - 1 ) - int32 (iter .docData .Len ())
3243+ limit := iter .limit - int32 (iter .docsToReceive - 1 ) - int32 (iter .docData .Len ())
32423244 if limit < iter .op .limit {
32433245 iter .op .limit = limit
32443246 }
You can’t perform that action at this time.
0 commit comments