ssh remoting: Add infrastructure to handle reconnects (#18572)

This restructures the code in `remote` so that it's easier to replace
the current SSH connection with a new one in case of
disconnects/reconnects.

Right now, it successfully reconnects, BUT we're still missing the big
piece on the server-side: keeping the server process alive and
reconnecting to the same process that keeps the project-state.

Release Notes:

- N/A

---------

Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
Thorsten Ball 2024-10-01 12:16:44 +02:00 committed by GitHub
parent 527c9097f8
commit 7ce8797d78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 562 additions and 401 deletions

View file

@ -61,7 +61,7 @@ use postage::stream::Stream;
use project::{
DirectoryLister, Project, ProjectEntryId, ProjectPath, ResolvedPath, Worktree, WorktreeId,
};
use remote::{SshConnectionOptions, SshSession};
use remote::{SshConnectionOptions, SshRemoteClient};
use serde::Deserialize;
use session::AppSession;
use settings::{InvalidSettingsError, Settings};
@ -5514,7 +5514,7 @@ pub fn join_hosted_project(
pub fn open_ssh_project(
window: WindowHandle<Workspace>,
connection_options: SshConnectionOptions,
session: Arc<SshSession>,
session: Arc<SshRemoteClient>,
app_state: Arc<AppState>,
paths: Vec<PathBuf>,
cx: &mut AppContext,