diff --git a/zed/src/rpc.rs b/zed/src/rpc.rs index 61e7ab29b4051770bd5e3338ea3a7fd94a971ae8..294453422f5d8d9e111162f73437299cb9f09526 100644 --- a/zed/src/rpc.rs +++ b/zed/src/rpc.rs @@ -218,6 +218,12 @@ impl Client { }) } + pub async fn disconnect(&self) -> Result<()> { + let conn_id = self.connection_id().await?; + self.peer.disconnect(conn_id).await; + Ok(()) + } + async fn connection_id(&self) -> Result { self.state .read()