From b247f02c2907def0b569c958a589754dddc31012 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 4 Dec 2020 17:12:10 +0100 Subject: Don't close connection at first (stupid) excuse --- src/peering/basalt.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/peering') diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs index 8849f41..615b559 100644 --- a/src/peering/basalt.rs +++ b/src/peering/basalt.rs @@ -3,7 +3,7 @@ use std::net::SocketAddr; use std::sync::{Arc, RwLock}; use std::time::Duration; -use log::{debug, info, warn}; +use log::{trace, debug, info, warn}; use lru::LruCache; use rand::{thread_rng, Rng}; use serde::{Deserialize, Serialize}; @@ -303,7 +303,7 @@ impl Basalt { .sample(count) .iter() .map(|p| { - info!("KYEV S {}", hex::encode(p.id)); + debug!("KYEV S {}", hex::encode(p.id)); p.id }) .collect::>() @@ -339,7 +339,7 @@ impl Basalt { { Ok(resp) => { self.handle_peer_list(&resp.peers[..]); - info!("KYEV PEXi {}", hex::encode(peer)); + trace!("KYEV PEXi {}", hex::encode(peer)); } Err(e) => { warn!("Error during pull exchange: {}", e); @@ -351,7 +351,7 @@ impl Basalt { let push_msg = self.make_push_message(); match self.netapp.request(&peer, push_msg, PRIO_NORMAL).await { Ok(_) => { - info!("KYEV PEXo {}", hex::encode(peer)); + trace!("KYEV PEXo {}", hex::encode(peer)); } Err(e) => { warn!("Error during push exchange: {}", e); @@ -371,7 +371,7 @@ impl Basalt { tokio::time::delay_for(self.param.reset_interval).await; { - info!("KYEV R {}", self.param.reset_count); + debug!("KYEV R {}", self.param.reset_count); let mut view = self.view.write().unwrap(); let prev_peers = view.current_peers(); @@ -419,7 +419,7 @@ impl Basalt { attempts.insert(peer); } let res = self.netapp.clone().try_connect(peer.addr, peer.id).await; - debug!("Connection attempt to {}: {:?}", peer.addr, res); + trace!("Connection attempt to {}: {:?}", peer.addr, res); self.current_attempts.write().unwrap().remove(&peer); -- cgit v1.2.3