Remoting: Fix connecting to servers with long hostnames (#20093)
Closes #20018 Release Notes: - Remoting: Fixed connecting to hosts with long (>~50 character) hostnames
This commit is contained in:
parent
273173ec8a
commit
b5c38e9a09
7 changed files with 50 additions and 34 deletions
|
@ -49,7 +49,6 @@ parking_lot.workspace = true
|
|||
postage.workspace = true
|
||||
project.workspace = true
|
||||
task.workspace = true
|
||||
release_channel.workspace = true
|
||||
remote.workspace = true
|
||||
schemars.workspace = true
|
||||
serde.workspace = true
|
||||
|
|
|
@ -64,8 +64,7 @@ use postage::stream::Stream;
|
|||
use project::{
|
||||
DirectoryLister, Project, ProjectEntryId, ProjectPath, ResolvedPath, Worktree, WorktreeId,
|
||||
};
|
||||
use release_channel::ReleaseChannel;
|
||||
use remote::{SshClientDelegate, SshConnectionOptions};
|
||||
use remote::{ssh_session::ConnectionIdentifier, SshClientDelegate, SshConnectionOptions};
|
||||
use serde::Deserialize;
|
||||
use session::AppSession;
|
||||
use settings::Settings;
|
||||
|
@ -5496,26 +5495,14 @@ pub fn open_ssh_project(
|
|||
paths: Vec<PathBuf>,
|
||||
cx: &mut AppContext,
|
||||
) -> Task<Result<()>> {
|
||||
let release_channel = ReleaseChannel::global(cx);
|
||||
|
||||
cx.spawn(|mut cx| async move {
|
||||
let (serialized_ssh_project, workspace_id, serialized_workspace) =
|
||||
serialize_ssh_project(connection_options.clone(), paths.clone(), &cx).await?;
|
||||
|
||||
let identifier_prefix = match release_channel {
|
||||
ReleaseChannel::Stable => None,
|
||||
_ => Some(format!("{}-", release_channel.dev_name())),
|
||||
};
|
||||
let unique_identifier = format!(
|
||||
"{}workspace-{}",
|
||||
identifier_prefix.unwrap_or_default(),
|
||||
workspace_id.0
|
||||
);
|
||||
|
||||
let session = match cx
|
||||
.update(|cx| {
|
||||
remote::SshRemoteClient::new(
|
||||
unique_identifier,
|
||||
ConnectionIdentifier::Workspace(workspace_id.0),
|
||||
connection_options,
|
||||
cancel_rx,
|
||||
delegate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue