fix again
This commit is contained in:
parent
d15378a224
commit
57327f10e2
1 changed files with 9 additions and 2 deletions
|
@ -445,11 +445,18 @@ impl FullMeshPeeringStrategy {
|
|||
if let Some(host) = known_hosts.list.get_mut(&id) {
|
||||
host.state = PeerConnState::Connected;
|
||||
host.addr = addr;
|
||||
} else {
|
||||
known_hosts.list.insert(id, PeerInfoInternal{
|
||||
state: PeerConnState::Connected,
|
||||
addr,
|
||||
last_seen: None,
|
||||
ping: VecDeque::new(),
|
||||
});
|
||||
}
|
||||
known_hosts.update_hash();
|
||||
self.update_public_peer_list(&known_hosts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn on_disconnected(self: Arc<Self>, id: NodeID, is_incoming: bool) {
|
||||
if !is_incoming {
|
||||
|
|
Loading…
Reference in a new issue