Bump plugin manager channel sizes to account for more plugins

This commit is contained in:
Gregory Schier
2026-01-05 15:10:54 -08:00
parent e818c349cc
commit dc51de2af1
2 changed files with 3 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ pub struct PluginManager {
impl PluginManager { impl PluginManager {
pub fn new<R: Runtime>(app_handle: AppHandle<R>) -> PluginManager { pub fn new<R: Runtime>(app_handle: AppHandle<R>) -> PluginManager {
let (events_tx, mut events_rx) = mpsc::channel(128); let (events_tx, mut events_rx) = mpsc::channel(2048);
let (kill_server_tx, kill_server_rx) = tokio::sync::watch::channel(false); let (kill_server_tx, kill_server_rx) = tokio::sync::watch::channel(false);
let (client_disconnect_tx, mut client_disconnect_rx) = mpsc::channel(128); let (client_disconnect_tx, mut client_disconnect_rx) = mpsc::channel(128);
@@ -320,7 +320,7 @@ impl PluginManager {
} }
pub async fn subscribe(&self, label: &str) -> (String, mpsc::Receiver<InternalEvent>) { pub async fn subscribe(&self, label: &str) -> (String, mpsc::Receiver<InternalEvent>) {
let (tx, rx) = mpsc::channel(128); let (tx, rx) = mpsc::channel(2048);
let rx_id = format!("{label}_{}", generate_id()); let rx_id = format!("{label}_{}", generate_id());
self.subscribers.lock().await.insert(rx_id.clone(), tx); self.subscribers.lock().await.insert(rx_id.clone(), tx);
(rx_id, rx) (rx_id, rx)

View File

@@ -37,7 +37,7 @@ impl PluginRuntimeServerWebsocket {
} }
async fn accept_connection(&self, stream: TcpStream) { async fn accept_connection(&self, stream: TcpStream) {
let (to_plugin_tx, mut to_plugin_rx) = mpsc::channel::<InternalEvent>(128); let (to_plugin_tx, mut to_plugin_rx) = mpsc::channel::<InternalEvent>(2048);
let mut app_to_plugin_events_tx = self.app_to_plugin_events_tx.lock().await; let mut app_to_plugin_events_tx = self.app_to_plugin_events_tx.lock().await;
*app_to_plugin_events_tx = Some(to_plugin_tx); *app_to_plugin_events_tx = Some(to_plugin_tx);