From e743c36e24a80151d6f8fc23cdcbf78ea01c1cd4 Mon Sep 17 00:00:00 2001 From: Reboot-Codes Date: Sat, 31 Jan 2026 17:36:43 -0700 Subject: [PATCH] 16 gigs down to 37 megs! KJSDFGKJHSGDKJHGF 8.4 MILLION MESSAGES FML --- src/server/mod.rs | 3 ++- src/user/mod.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/mod.rs b/src/server/mod.rs index 46bfbd9..1b53cc4 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -6,4 +6,5 @@ pub mod websockets; pub const DEAUTH_EVENT: &str = "nexus://com.reboot-codes.nexus/websockets/deauthorize"; pub const AUTH_HEADER: &str = "Authorization"; -pub const MAX_SIZE: usize = 8388608; +/// Max amount of messages for all broadcast channels.... please keep low. +pub const MAX_SIZE: usize = 256; diff --git a/src/user/mod.rs b/src/user/mod.rs index 2e156a6..b7664ee 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -7,7 +7,7 @@ use crate::{ websockets::WsIn, }, }; -use log::error; +use log::{debug, error}; use regex::Regex; use std::sync::Arc; use tokio::{ @@ -91,6 +91,7 @@ impl NexusUser { match Regex::new(&allowed_event_regex) { Ok(regex) => { if regex.is_match(&message.kind.clone()) { + debug!("Sending event to user: {}...", this.api_key.user_id.clone(),); match tx.clone().send(message.clone()) { Ok(_) => {} Err(e) => { -- 2.51.2