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,9 +445,16 @@ 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;
known_hosts.update_hash(); } else {
self.update_public_peer_list(&known_hosts); 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);
} }
} }