(ported from github)
I have some code that used mongoc_cursor_more() to detect end of data in version 0.9.0 and appeared to work correctly.
It is basically structured like:
while(mongoc_cursor_more(c)) { if(mongoc_cursor_next(c, &bdoc)) { // do stuff } else { // handle presumed error } }
However, I am upgrading to 0.98.0 and now it appears that mongoc_cursor_more() always returns true, even when mongoc_cursor_next() indicates that the cursor is exhausted. I have to examine the cursor error and find it set to 0 to detect end of data. Is this a bug or am I missing something?
- is duplicated by
-
CDRIVER-708 mongoc_cursor_more doesn't work as expected
- Closed