Skip to content

Commit

Permalink
fix: remove connection limits
Browse files Browse the repository at this point in the history
  • Loading branch information
stringhandler committed Dec 30, 2024
1 parent 204c18f commit 320d77d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/server/p2p/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ struct PerformCatchUpSync {
pub struct ServerNetworkBehaviour {
// This must be the first behaviour otherwise you end up with a debug-assert failing in
// req-resp
pub connection_limits: connection_limits::Behaviour,
// pub connection_limits: connection_limits::Behaviour,
pub mdns: Toggle<mdns::Behaviour<Tokio>>,
pub gossipsub: gossipsub::Behaviour,
pub share_chain_sync: cbor::Behaviour<SyncMissingBlocksRequest, Result<SyncMissingBlocksResponse, String>>,
Expand Down Expand Up @@ -1193,10 +1193,10 @@ where S: ShareChain
num_established,
cause,
} => {
// Ignore dials where we can't get hold of the person
if !endpoint.is_dialer() {
warn!(target: LOG_TARGET, squad = &self.config.squad; "Connection closed: {peer_id:?} -> {endpoint:?} ({num_established:?}) -> {cause:?}");
}
// // Ignore dials where we can't get hold of the person
// if !endpoint.is_dialer() {
// warn!(target: LOG_TARGET, squad = &self.config.squad; "Connection closed: {peer_id:?} ->
// {endpoint:?} ({num_established:?}) -> {cause:?}"); }
warn!(target: LOG_TARGET, squad = &self.config.squad; "Connection closed: {peer_id:?} -> {endpoint:?} ({num_established:?}) -> {cause:?}");
},
SwarmEvent::IncomingConnectionError {
Expand Down
2 changes: 1 addition & 1 deletion src/server/p2p/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub(crate) async fn new_swarm(config: &config::Config) -> Result<Swarm<ServerNet
relay_client,
dcutr: dcutr::Behaviour::new(key_pair.public().to_peer_id()),
autonat: autonat::Behaviour::new(key_pair.public().to_peer_id(), Default::default()),
connection_limits: connection_limits::Behaviour::new(ConnectionLimits::default().with_max_established_incoming(config.max_incoming_connections).with_max_established_outgoing(config.max_outgoing_connections)),
// connection_limits: connection_limits::Behaviour::new(ConnectionLimits::default().with_max_established_incoming(config.max_incoming_connections).with_max_established_outgoing(config.max_outgoing_connections)),
ping: ping::Behaviour::new(ping::Config::default().with_timeout(Duration::from_secs(30))),
})
})
Expand Down

0 comments on commit 320d77d

Please sign in to comment.