From e549b29cce6ffe1762c68118bb01e126da2b7199 Mon Sep 17 00:00:00 2001 From: mempirate Date: Fri, 23 Dec 2022 11:24:04 +0100 Subject: [PATCH] feat(net): increase session command buffer (#585) * refactor: unnecessary return * feat: increase session command buffer to 32 --- crates/net/network/src/session/config.rs | 2 +- crates/net/network/src/session/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/net/network/src/session/config.rs b/crates/net/network/src/session/config.rs index 7b157cef22..9b7befa8ec 100644 --- a/crates/net/network/src/session/config.rs +++ b/crates/net/network/src/session/config.rs @@ -25,7 +25,7 @@ impl Default for SessionsConfig { SessionsConfig { // This should be sufficient to slots for handling commands sent to the session task, // since the manager is the sender. - session_command_buffer: 10, + session_command_buffer: 32, // This should be greater since the manager is the receiver. The total size will be // `buffer + num sessions`. Each session can therefor fit at least 1 message in the // channel. The buffer size is additional capacity. The channel is always drained on diff --git a/crates/net/network/src/session/mod.rs b/crates/net/network/src/session/mod.rs index 1e24c3c938..dfb1403ef4 100644 --- a/crates/net/network/src/session/mod.rs +++ b/crates/net/network/src/session/mod.rs @@ -311,7 +311,7 @@ impl SessionManager { Poll::Ready(None) => unreachable!("Manager holds both channel halves."), Poll::Ready(Some(event)) => event, }; - return match event { + match event { PendingSessionEvent::Established { session_id, remote_addr,