gossip: Fix mark_dead

We should change the state stored in endpoint_state_map, not local
variable.
This commit is contained in:
Asias He
2015-07-24 14:16:48 +08:00
parent c3b77f499b
commit 4e72b2a6b1
2 changed files with 2 additions and 2 deletions

View File

@@ -935,7 +935,7 @@ void gossiper::real_mark_alive(inet_address addr, endpoint_state local_state) {
}
}
void gossiper::mark_dead(inet_address addr, endpoint_state local_state) {
void gossiper::mark_dead(inet_address addr, endpoint_state& local_state) {
logger.trace("marking as down {}", addr);
local_state.mark_dead();
_live_endpoints.erase(addr);

View File

@@ -351,7 +351,7 @@ private:
void real_mark_alive(inet_address addr, endpoint_state local_state);
void mark_dead(inet_address addr, endpoint_state local_state);
void mark_dead(inet_address addr, endpoint_state& local_state);
/**
* This method is called whenever there is a "big" change in ep state (a generation change for a known node).