Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mystenmark authored and bmwill committed Feb 1, 2024
1 parent ec66f7b commit 26d415e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions crates/anemo/src/network/connection_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,16 @@ impl ConnectionManager {
// TODO close the connection explicitly with a reason once we have machine
// readable errors. See https://github.com/MystenLabs/anemo/issues/13 for more info.
match known_peers.get(&connection.peer_id()) {
Some(PeerInfo { affinity: PeerAffinity::High | PeerAffinity::Allowed, .. }) =>
{
Some(PeerInfo {
affinity: PeerAffinity::High | PeerAffinity::Allowed,
..
}) => {
// Do nothing, let the connection through
}
Some(PeerInfo { affinity: PeerAffinity::Never, .. }) => {
Some(PeerInfo {
affinity: PeerAffinity::Never,
..
}) => {
return Err(anyhow::anyhow!(
"rejecting connection from peer {} due to having PeerAffinity::Never",
connection.peer_id()
Expand Down

0 comments on commit 26d415e

Please sign in to comment.