From 3f407c7b9bfcd06c7990fb795b3a5ceb08e48891 Mon Sep 17 00:00:00 2001 From: "Nathan.fooo" <86001920+appflowy@users.noreply.github.com> Date: Sat, 3 Feb 2024 08:17:40 +0800 Subject: [PATCH] chore: increate mailbox capacity (#287) --- libs/realtime/src/collaborate/server.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/realtime/src/collaborate/server.rs b/libs/realtime/src/collaborate/server.rs index 58c33d1d..cd89a577 100644 --- a/libs/realtime/src/collaborate/server.rs +++ b/libs/realtime/src/collaborate/server.rs @@ -168,7 +168,7 @@ where type Context = Context; fn started(&mut self, ctx: &mut Self::Context) { - ctx.set_mailbox_capacity(100); + ctx.set_mailbox_capacity(1000); } } @@ -203,7 +203,11 @@ where // when a new connection is established, remove the old connection from all groups remove_user(&groups, &editing_collab_by_user, &new_conn.user).await; - info!("new client stream:{}", &new_conn.user); + info!( + "new user: {}, connected user:{}", + &new_conn.user, + user_by_uid.read().keys().len() + ); if let Some(old_stream) = client_stream_by_user .write() .await