diff --git a/crates/anemo/src/network/connection_manager.rs b/crates/anemo/src/network/connection_manager.rs index aee15451..49fe4803 100644 --- a/crates/anemo/src/network/connection_manager.rs +++ b/crates/anemo/src/network/connection_manager.rs @@ -247,6 +247,8 @@ impl ConnectionManager { // Check against limit if let Some(limit) = config.max_concurrent_connections() { // We've hit the limit + // TODO maybe have a way to temporatily hold on to a "slot" so that we can ensure + // we don't go over this limit if multiple connections come in simultaneously. if active_peers.len() >= limit { // check if this is a high affinity peer to bypass the limit match known_peers.get(&connection.peer_id()) {