Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Delete hosted projects from database when connection is lost

Antonio Scandurra26b565342725
diff --git a/crates/collab/src/db.rs b/crates/collab/src/db.rs
index 063d82f9325..5ab2b1b8243 100644
--- a/crates/collab/src/db.rs
+++ b/crates/collab/src/db.rs
@@ -1424,6 +1424,11 @@ impl Database {
}
}
+ project::Entity::delete_many()
+ .filter(project::Column::HostConnectionId.eq(connection_id.0 as i32))
+ .exec(&*tx)
+ .await?;
+
Ok((room_id, left_projects))
})
.await