wasm fixes
This commit is contained in:
@@ -83,6 +83,7 @@ impl ConnectionTable {
|
||||
unord.push(v);
|
||||
}
|
||||
}
|
||||
inner.protocol_index_by_id.clear();
|
||||
inner.id_by_descriptor.clear();
|
||||
inner.ids_by_remote.clear();
|
||||
unord
|
||||
|
@@ -542,7 +542,7 @@ impl RoutingTable {
|
||||
}
|
||||
|
||||
/// Attempt to empty the routing table
|
||||
/// should only be performed when there are no node_refs (detached)
|
||||
/// May not empty buckets completely if there are existing node_refs
|
||||
pub fn purge_buckets(&self) {
|
||||
self.inner.write().purge_buckets();
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
|
||||
#[derive(Clone, Debug, RkyvArchive, RkyvSerialize, RkyvDeserialize)]
|
||||
#[archive_attr(repr(C), derive(CheckBytes))]
|
||||
#[archive_attr(repr(C, align(8)), derive(CheckBytes))]
|
||||
pub struct RouteSpecDetail {
|
||||
/// Crypto kind
|
||||
pub crypto_kind: CryptoKind,
|
||||
@@ -13,7 +13,7 @@ pub struct RouteSpecDetail {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, RkyvArchive, RkyvSerialize, RkyvDeserialize)]
|
||||
#[archive_attr(repr(C), derive(CheckBytes))]
|
||||
#[archive_attr(repr(C, align(8)), derive(CheckBytes))]
|
||||
pub struct RouteSetSpecDetail {
|
||||
/// Route set per crypto kind
|
||||
route_set: BTreeMap<PublicKey, RouteSpecDetail>,
|
||||
|
@@ -471,13 +471,14 @@ impl VeilidAPI {
|
||||
// Purge connection table
|
||||
let connection_manager = self.network_manager()?.connection_manager();
|
||||
connection_manager.shutdown().await;
|
||||
connection_manager.startup().await;
|
||||
|
||||
// Eliminate last_connections from routing table entries
|
||||
self.network_manager()?
|
||||
.routing_table()
|
||||
.purge_last_connections();
|
||||
|
||||
connection_manager.startup().await;
|
||||
|
||||
Ok("Connections purged".to_owned())
|
||||
} else if args[0] == "routes" {
|
||||
// Purge route spec store
|
||||
|
Reference in New Issue
Block a user