chore: increate mailbox capacity (#287)

This commit is contained in:
Nathan.fooo 2024-02-03 08:17:40 +08:00 committed by GitHub
parent 14a146d65f
commit 3f407c7b9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -168,7 +168,7 @@ where
type Context = Context<Self>;
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