more semantics

This commit is contained in:
Christien Rioux
2023-07-14 19:37:06 -04:00
parent e61d6be6a9
commit 4960d13447
5 changed files with 34 additions and 16 deletions

View File

@@ -865,15 +865,19 @@ impl Network {
debug!("clearing dial info");
let mut editor = routing_table.edit_routing_domain(RoutingDomain::PublicInternet);
editor.clear_dial_info_details();
editor.set_network_class(None);
editor.commit();
routing_table
.edit_routing_domain(RoutingDomain::PublicInternet)
.clear_dial_info_details()
.set_network_class(None)
.clear_relay_node()
.commit();
let mut editor = routing_table.edit_routing_domain(RoutingDomain::LocalNetwork);
editor.clear_dial_info_details();
editor.set_network_class(None);
editor.commit();
routing_table
.edit_routing_domain(RoutingDomain::LocalNetwork)
.clear_dial_info_details()
.set_network_class(None)
.clear_relay_node()
.commit();
// Reset state including network class
*self.inner.lock() = Self::new_inner();

View File

@@ -933,6 +933,7 @@ impl Network {
// Network class could not be determined
editor.clear_dial_info_details();
editor.set_network_class(None);
editor.clear_relay_node();
changed = true;
log_net!(debug "PublicInternet network class cleared");
}