changed the register_with_local_peers

This commit is contained in:
asxalex 2024-07-16 16:21:37 +08:00
parent dc9bf9cc6b
commit 8f365e32db

View File

@ -258,7 +258,7 @@ pub async fn handle_packet_peer_info(
sock.to_string() sock.to_string()
); );
send_register(eee, &sock, &None).await; send_register(eee, &sock, &None).await;
register_with_local_peers(eee).await; // register_with_local_peers(eee).await;
} }
None => { None => {
debug!("Rx PEERINFO unknown peer: {}", ip_to_string(&pi.dst_ip)); debug!("Rx PEERINFO unknown peer: {}", ip_to_string(&pi.dst_ip));
@ -795,7 +795,6 @@ pub async fn check_query_peer_info(eee: &Node, dst_ip: u32) {
debug!("insert peer {} to pending", ip_to_string(&dst_ip)); debug!("insert peer {} to pending", ip_to_string(&dst_ip));
println!("insert peer {} to pending", ip_to_string(&dst_ip)); println!("insert peer {} to pending", ip_to_string(&dst_ip));
eee.pending_peers.insert_peer(peer.clone()); eee.pending_peers.insert_peer(peer.clone());
register_with_local_peers(eee).await;
scan = peer; scan = peer;
} }
Some(s) => { Some(s) => {
@ -819,6 +818,7 @@ pub async fn check_query_peer_info(eee: &Node, dst_ip: u32) {
.await; .await;
*/ */
debug!("sending query for {}", ip_to_string(&dst_ip)); debug!("sending query for {}", ip_to_string(&dst_ip));
register_with_local_peers(eee).await;
if let Ok(()) = send_query_peer(eee, dst_ip).await { if let Ok(()) = send_query_peer(eee, dst_ip).await {
scan.last_sent_query.store(now, Ordering::Relaxed); scan.last_sent_query.store(now, Ordering::Relaxed);
} }