ssh: Limit amount of reconnect attempts (#18819)

Co-Authored-by: Thorsten <thorsten@zed.dev>

Release Notes:

- N/A

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
This commit is contained in:
Bennet Bo Fenner 2024-10-08 11:37:54 +02:00 committed by GitHub
parent 910a773b89
commit fa85238c69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 415 additions and 127 deletions

View file

@ -1263,8 +1263,10 @@ impl Project {
.clone()
}
pub fn ssh_is_connected(&self, cx: &AppContext) -> Option<bool> {
Some(!self.ssh_client.as_ref()?.read(cx).is_reconnect_underway())
pub fn ssh_connection_state(&self, cx: &AppContext) -> Option<remote::ConnectionState> {
self.ssh_client
.as_ref()
.map(|ssh| ssh.read(cx).connection_state())
}
pub fn replica_id(&self) -> ReplicaId {