move tasks to network manager
This commit is contained in:
@@ -281,6 +281,7 @@ impl Network {
|
||||
if !self.unlocked_inner.interfaces.refresh().await? {
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
self.inner.lock().network_needs_restart = true;
|
||||
Ok(true)
|
||||
}
|
||||
@@ -613,9 +614,6 @@ impl Network {
|
||||
info!("network started");
|
||||
self.inner.lock().network_started = true;
|
||||
|
||||
// Inform routing table entries that our dial info has changed
|
||||
self.routing_table().send_node_info_updates(true).await;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@@ -633,6 +633,8 @@ impl Network {
|
||||
if network_class.is_some() {
|
||||
// Update public dial info
|
||||
let routing_table = self.routing_table();
|
||||
let network_manager = self.network_manager();
|
||||
|
||||
for ctx in contexts {
|
||||
let inner = ctx.inner.lock();
|
||||
if let Some(pdi) = &inner.detected_public_dial_info {
|
||||
@@ -650,7 +652,7 @@ impl Network {
|
||||
log_net!(debug "network class changed to {:?}", network_class);
|
||||
|
||||
// Send updates to everyone
|
||||
routing_table.send_node_info_updates(true).await;
|
||||
network_manager.send_node_info_updates(true).await;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user