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
|
@ -67,8 +67,12 @@ impl Project {
|
|||
}
|
||||
|
||||
fn ssh_command(&self, cx: &AppContext) -> Option<SshCommand> {
|
||||
if let Some(ssh_session) = self.ssh_session.as_ref() {
|
||||
return Some(SshCommand::Direct(ssh_session.ssh_args()));
|
||||
if let Some(args) = self
|
||||
.ssh_client
|
||||
.as_ref()
|
||||
.and_then(|session| session.ssh_args())
|
||||
{
|
||||
return Some(SshCommand::Direct(args));
|
||||
}
|
||||
|
||||
let dev_server_project_id = self.dev_server_project_id()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue