Skip to content

Commit

Permalink
Fix Client::finish() (#2071)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M authored Feb 26, 2024
1 parent 585260e commit 9e6976a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdk/src/client/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl ClientBuilder {

let node_sync_interval = self.node_manager_builder.node_sync_interval;
let ignore_node_health = self.node_manager_builder.ignore_node_health;
let nodes = self
let nodes: HashSet<Node> = self
.node_manager_builder
.primary_nodes
.iter()
Expand All @@ -207,7 +207,9 @@ impl ClientBuilder {
let (mqtt_event_tx, mqtt_event_rx) = tokio::sync::watch::channel(MqttEvent::Connected);

let client_inner = Arc::new(ClientInner {
node_manager: RwLock::new(self.node_manager_builder.build(HashSet::new())),
// Initially assume all nodes are healthy, so `fetch_network_info()` works. `sync_nodes()` will afterwards
// update the healthy nodes.
node_manager: RwLock::new(self.node_manager_builder.build(nodes.clone())),
api_timeout: RwLock::new(self.api_timeout),
#[cfg(feature = "mqtt")]
mqtt: super::MqttInner {
Expand Down

0 comments on commit 9e6976a

Please sign in to comment.