Skip to content

Commit

Permalink
close connection
Browse files Browse the repository at this point in the history
  • Loading branch information
getong committed Jan 21, 2025
1 parent 8bd948f commit 63aef9b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mod_libp2p/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ impl EventLoop {
for addr in listen_addrs {
self.swarm.behaviour_mut().kad.add_address(&peer_id, addr);
}
} else {
error!(
"peer_id {:?} is not valid, ethereum address: {} is not registered",
peer_id, controller_address
);
self.swarm.close_connection(connection_id);
}
} else {
error!(
Expand Down

0 comments on commit 63aef9b

Please sign in to comment.