1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00

wezterm connect unix could exit on startup

This is a similar race condition to one we had before with the
multiplexer, where the connection UI made us think that we didn't
need to start a new process.

Additionally, the attach method would unconditionally create a
new client without checking whether we already had one.
This commit is contained in:
Wez Furlong 2022-01-11 22:35:31 -07:00
parent 58d969e77c
commit e314d84711
2 changed files with 5 additions and 3 deletions

View File

@ -474,6 +474,11 @@ impl Domain for ClientDomain {
}
async fn attach(&self) -> anyhow::Result<()> {
if self.state() == DomainState::Attached {
// Already attached
return Ok(());
}
let domain_id = self.local_domain_id;
let config = self.config.clone();

View File

@ -267,9 +267,6 @@ async fn spawn_tab_in_default_domain_if_mux_is_empty(
) -> anyhow::Result<()> {
let mux = Mux::get().unwrap();
if !mux.is_empty() {
return Ok(());
}
let domain = mux.default_domain();
domain.attach().await?;