1
1
mirror of https://github.com/wez/wezterm.git synced 2024-08-16 17:50:28 +03:00

fix potential panic on shutdown when mux_enable_ssh_agent=true

refs: https://github.com/wez/wezterm/issues/5518
This commit is contained in:
Wez Furlong 2024-07-13 15:50:03 -07:00
parent 4e8eb7c2ca
commit 4884f31762
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -127,8 +127,10 @@ impl AgentProxy {
std::thread::sleep(std::time::Duration::from_millis(100));
while receiver.try_recv().is_ok() {}
if let Some(agent) = &Mux::get().agent {
agent.update_now();
if let Some(mux) = Mux::try_get() {
if let Some(agent) = &mux.agent {
agent.update_now();
}
}
}
}