aboutsummaryrefslogtreecommitdiff
path: root/src/peering/basalt.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-04 17:12:10 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-04 17:12:10 +0100
commitb247f02c2907def0b569c958a589754dddc31012 (patch)
tree264d0e304a5bf4500ec1e9c31ba32dbd1d78991a /src/peering/basalt.rs
parent45766aa5d74b4570286c1298b21baac2c4727c48 (diff)
downloadnetapp-b247f02c2907def0b569c958a589754dddc31012.tar.gz
netapp-b247f02c2907def0b569c958a589754dddc31012.zip
Don't close connection at first (stupid) excuse
Diffstat (limited to 'src/peering/basalt.rs')
-rw-r--r--src/peering/basalt.rs12
1 files changed, 6 insertions, 6 deletions
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::<Vec<_>>()
@@ -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);