Skip to content

Commit

Permalink
gossiper: do_stop_gossiping: copy live endpoints vector
Browse files Browse the repository at this point in the history
It can be resized asynchronously by mark_dead.

Fixes scylladb#5701

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
Message-Id: <20200203091344.229518-1-bhalevy@scylladb.com>
  • Loading branch information
bhalevy authored and avikivity committed Feb 4, 2020
1 parent 501b24c commit f45faba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gms/gossiper.cc
Expand Up @@ -1935,7 +1935,8 @@ future<> gossiper::do_stop_gossiping() {
if (my_ep_state && !is_silent_shutdown_state(*my_ep_state)) {
logger.info("Announcing shutdown");
add_local_application_state(application_state::STATUS, _value_factory.shutdown(true)).get();
for (inet_address addr : _live_endpoints) {
auto live_endpoints = _live_endpoints;
for (inet_address addr : live_endpoints) {
msg_addr id = get_msg_addr(addr);
logger.trace("Sending a GossipShutdown to {}", id);
ms().send_gossip_shutdown(id, get_broadcast_address()).then_wrapped([id] (auto&&f) {
Expand Down

0 comments on commit f45faba

Please sign in to comment.