File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -362,16 +362,16 @@ class Result implements Iterator<DBObject> {
362
362
}
363
363
364
364
private void init ( Response res ){
365
+ if ( ( res ._flags & Bytes .RESULTFLAG_CURSORNOTFOUND ) > 0 ){
366
+ throw new MongoException .CursorNotFound (_curResult .cursor (), res .serverUsed ());
367
+ }
368
+
365
369
_totalBytes += res ._len ;
366
370
_curResult = res ;
367
371
_cur = res .iterator ();
368
372
_sizes .add ( res .size () );
369
373
_numFetched += res .size ();
370
374
371
- if ( ( res ._flags & Bytes .RESULTFLAG_CURSORNOTFOUND ) > 0 ){
372
- throw new MongoException .CursorNotFound (res ._cursor , res .serverUsed ());
373
- }
374
-
375
375
if (res ._cursor != 0 && _limit > 0 && _limit - _numFetched <= 0 ) {
376
376
// fetched all docs within limit, close cursor server-side
377
377
killCursor ();
You can’t perform that action at this time.
0 commit comments