Skip to content

Commit

Permalink
Add missing reset for start iterator in case of neighbor node queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishakha Gupta-Cledat committed May 24, 2018
1 parent f3ae132 commit 6b44419
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PMGDQueryHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ int PMGDQueryHandler::query_node(const protobufs::QueryNode &qn,
if (!bool(ni)) {
set_response(response, PMGDCmdResponse::Empty,
"Null search iterator\n");
if (has_link)
start_ni->reset();
return -1;
}

Expand Down Expand Up @@ -413,6 +415,8 @@ int PMGDQueryHandler::query_node(const protobufs::QueryNode &qn,
if (bool(*tni)) { // Not unique and that is an error here.
set_response(response, PMGDCmdResponse::NotUnique,
"Query response not unique\n");
if (has_link)
start_ni->reset();
delete tni;
return -1;
}
Expand Down

0 comments on commit 6b44419

Please sign in to comment.