Skip to content
Snippets Groups Projects
Commit 604c75c2 authored by Dmitry Simonenko's avatar Dmitry Simonenko Committed by Roman Tsisyk
Browse files

gh-1318-sophia-cursor: make fix for #1104

Automatically close the cursor after a last read key.
parent e8dbe8cd
No related branches found
No related tags found
No related merge requests found
......@@ -671,6 +671,9 @@ sophia_iterator_next_sync(struct iterator *ptr)
if (obj == NULL) {
ptr->next = sophia_iterator_last;
it->current = NULL;
/* immediately close the cursor */
sp_destroy(it->cursor);
it->cursor = NULL;
return NULL;
}
it->current = obj;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment