mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 13:39:25 +00:00
Limit each peer to one connection
Prevents dialing the same peer multiple times (successfully).
This commit is contained in:
@@ -225,8 +225,10 @@ impl SwarmTask {
|
||||
}
|
||||
}
|
||||
|
||||
SwarmEvent::Behaviour(BehaviorEvent::AllowList(event)) => {
|
||||
// Ensure this is an unreachable case, not an actual event
|
||||
SwarmEvent::Behaviour(
|
||||
BehaviorEvent::AllowList(event) | BehaviorEvent::ConnectionLimits(event)
|
||||
) => {
|
||||
// Ensure these are unreachable cases, not actual events
|
||||
let _: void::Void = event;
|
||||
}
|
||||
SwarmEvent::Behaviour(
|
||||
|
||||
Reference in New Issue
Block a user