Allow reconnect before disconnect (#8684)
Co-Authored-By: Max <max@zed.dev> Release Notes: - Improved handling of reconnections during calls --------- Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
3efb871cd4
commit
5523a510c5
6 changed files with 22 additions and 23 deletions
|
@ -161,11 +161,9 @@ impl Database {
|
|||
|
||||
// Find the collaborator record for this user's previous lost
|
||||
// connection. Update it with the new connection id.
|
||||
let server_id = ServerId(connection_id.owner_id as i32);
|
||||
let Some(self_collaborator) = collaborators.iter_mut().find(|c| {
|
||||
c.user_id == user_id
|
||||
&& (c.connection_lost || c.connection_server_id != server_id)
|
||||
}) else {
|
||||
let Some(self_collaborator) =
|
||||
collaborators.iter_mut().find(|c| c.user_id == user_id)
|
||||
else {
|
||||
log::info!("can't rejoin buffer, no previous collaborator found");
|
||||
continue;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue