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:
parent
527c9097f8
commit
7ce8797d78
11 changed files with 562 additions and 401 deletions
|
@ -11,7 +11,7 @@ use gpui::{
|
|||
Transformation, View,
|
||||
};
|
||||
use release_channel::{AppVersion, ReleaseChannel};
|
||||
use remote::{SshConnectionOptions, SshPlatform, SshSession};
|
||||
use remote::{SshConnectionOptions, SshPlatform, SshRemoteClient};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{Settings, SettingsSources};
|
||||
|
@ -376,12 +376,12 @@ pub fn connect_over_ssh(
|
|||
connection_options: SshConnectionOptions,
|
||||
ui: View<SshPrompt>,
|
||||
cx: &mut WindowContext,
|
||||
) -> Task<Result<Arc<SshSession>>> {
|
||||
) -> Task<Result<Arc<SshRemoteClient>>> {
|
||||
let window = cx.window_handle();
|
||||
let known_password = connection_options.password.clone();
|
||||
|
||||
cx.spawn(|mut cx| async move {
|
||||
remote::SshSession::client(
|
||||
remote::SshRemoteClient::new(
|
||||
connection_options,
|
||||
Arc::new(SshClientDelegate {
|
||||
window,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue