1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-26 08:25:50 +03:00

ssh: libssh: improve diagnostic in case connect fails

show the host/port combo being attempted

refs: https://github.com/wez/wezterm/issues/2617
This commit is contained in:
Wez Furlong 2022-10-11 08:19:40 -07:00
parent 4d598eb1ad
commit 5feadb347e

View File

@ -203,7 +203,8 @@ impl SessionInner {
sess.set_option(libssh_rs::SshOption::BindAddress(bind_addr.to_string()))?;
}
sess.connect()?;
sess.connect()
.with_context(|| format!("Connecting to {hostname}:{port}"))?;
let banner = sess.get_server_banner()?;
self.tx_event