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.

Reset connection pool when tearing down the server in tests

Antonio Scandurra4dc838fbb700
diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs
index 861a02fd317..89aec5bb05f 100644
--- a/crates/collab/src/rpc.rs
+++ b/crates/collab/src/rpc.rs
@@ -323,8 +323,10 @@ impl Server {
Ok(())
}
+ #[cfg(test)]
pub fn teardown(&self) {
self.peer.reset();
+ self.connection_pool.lock().reset();
let _ = self.teardown.send(());
}