Skip to content

Commit

Permalink
feat(session): move feeler connection dropping logging to debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
aesedepece committed Jul 9, 2020
1 parent f540081 commit 3141f04
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions node/src/actors/session/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,25 @@ impl StreamHandler<BytesMut, Error> for Session {
try_consolidate_session(self, ctx);
}
Err(err) => {
log::warn!("Dropping peer {}: {}", self.remote_addr, err);

if session_type == SessionType::Feeler {
let peers_manager_addr = PeersManager::from_registry();
// Ice the peer that was an error
peers_manager_addr.do_send(RemoveAddressesFromTried {
addresses: vec![self.remote_addr],
ice: true,
});
log::debug!(
"Dropping feeler connection {}: {}",
self.remote_addr,
err
);
} else {
log::warn!(
"Dropping {:?} peer {}: {}",
session_type,
self.remote_addr,
err
);
}

// Stop this session
Expand Down

0 comments on commit 3141f04

Please sign in to comment.