fix again

This commit is contained in:
Alex 2021-10-21 12:33:35 +02:00
parent d15378a224
commit 57327f10e2
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1

View file

@ -445,11 +445,18 @@ impl FullMeshPeeringStrategy {
if let Some(host) = known_hosts.list.get_mut(&id) { if let Some(host) = known_hosts.list.get_mut(&id) {
host.state = PeerConnState::Connected; host.state = PeerConnState::Connected;
host.addr = addr; host.addr = addr;
} else {
known_hosts.list.insert(id, PeerInfoInternal{
state: PeerConnState::Connected,
addr,
last_seen: None,
ping: VecDeque::new(),
});
}
known_hosts.update_hash(); known_hosts.update_hash();
self.update_public_peer_list(&known_hosts); self.update_public_peer_list(&known_hosts);
} }
} }
}
fn on_disconnected(self: Arc<Self>, id: NodeID, is_incoming: bool) { fn on_disconnected(self: Arc<Self>, id: NodeID, is_incoming: bool) {
if !is_incoming { if !is_incoming {