Skip to content

Commit d117efb

Browse files
committed
CDRIVER-1530 fix cursor_next and tailable find cmd
1 parent 48ec189 commit d117efb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/mongoc/mongoc-cursor-cursorid.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,11 @@ _mongoc_cursor_cursorid_next (mongoc_cursor_t *cursor,
298298
}
299299

300300
done:
301-
cursor->done = *bson ? false : true;
302-
RETURN (!cursor->done);
301+
if (!*bson && mongoc_cursor_get_id (cursor) == 0) {
302+
cursor->done = 1;
303+
}
304+
305+
RETURN (*bson != NULL);
303306
}
304307

305308

0 commit comments

Comments
 (0)