mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-26 00:19:46 +00:00
Expose Client::disconnect
to force disconnection
This commit is contained in:
parent
899b9cd5ad
commit
61222b4fe5
1 changed files with 6 additions and 0 deletions
|
@ -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<ConnectionId> {
|
||||
self.state
|
||||
.read()
|
||||
|
|
Loading…
Reference in a new issue