do not try to connect if not a part of cluster
This commit is contained in:
parent
c94c799347
commit
023e5b4b90
@ -751,7 +751,11 @@ impl ClusterConnections {
|
|||||||
pub fn update_nodes_set(&self) {
|
pub fn update_nodes_set(&self) {
|
||||||
let mut data = self.data.write();
|
let mut data = self.data.write();
|
||||||
let mut new_nodes = self.key_server_set.get();
|
let mut new_nodes = self.key_server_set.get();
|
||||||
new_nodes.remove(&self.self_node_id);
|
// we do not need to connect to self
|
||||||
|
// + we do not need to try to connect to any other node if we are not the part of a cluster
|
||||||
|
if new_nodes.remove(&self.self_node_id).is_none() {
|
||||||
|
new_nodes.clear();
|
||||||
|
}
|
||||||
|
|
||||||
let mut num_added_nodes = 0;
|
let mut num_added_nodes = 0;
|
||||||
let mut num_removed_nodes = 0;
|
let mut num_removed_nodes = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user