Fixed state sync abandon stale requests issue.

This commit is contained in:
ravinsp
2020-12-18 06:26:46 +05:30
parent 21482a3f8a
commit 13c6b81b60

View File

@@ -98,13 +98,13 @@ namespace state_sync
hpfs::h32 new_state = hpfs::h32_empty;
const int result = request_loop(ctx.target_state, new_state);
if (result == -1 || ctx.is_shutting_down)
break;
ctx.pending_requests.clear();
ctx.candidate_state_responses.clear();
ctx.submitted_requests.clear();
if (result == -1 || ctx.is_shutting_down)
break;
{
std::shared_lock lock(ctx.target_state_mutex);