Trace terminal loop failures
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s

This commit is contained in:
DuProcess
2026-07-17 19:55:16 -04:00
parent 7a9ad38657
commit 86a1942aa0
+22 -7
View File
@@ -486,7 +486,8 @@ async fn main() -> Result<()> {
detach_once(&socket, &cred, 2).await?;
return Ok(());
}
return run_terminal(
return trace_terminal_result(
run_terminal(
socket,
cred,
Some(target_udp_addr),
@@ -501,7 +502,8 @@ async fn main() -> Result<()> {
false,
None,
)
.await;
.await,
);
}
Err(err) => {
log_debug(
@@ -525,7 +527,8 @@ async fn main() -> Result<()> {
detach_once(&socket, &cred, 2).await?;
return Ok(());
}
return run_terminal(
return trace_terminal_result(
run_terminal(
socket,
cred,
Some(target_udp_addr),
@@ -540,7 +543,8 @@ async fn main() -> Result<()> {
false,
None,
)
.await;
.await,
);
}
Err(err) => {
log_debug(
@@ -601,7 +605,8 @@ async fn main() -> Result<()> {
detach_once(&socket, &cred, 2).await?;
return Ok(());
}
return run_terminal(
return trace_terminal_result(
run_terminal(
socket,
cred,
Some(addr),
@@ -616,7 +621,8 @@ async fn main() -> Result<()> {
args.forward_only,
agent_sock,
)
.await;
.await,
);
}
Err(err) if !forwarding_requested && auth_allows(&auth_preference, "ssh") => {
log_debug(
@@ -680,6 +686,7 @@ async fn main() -> Result<()> {
detach_once(&socket, &cred, 2).await?;
return Ok(());
}
trace_terminal_result(
run_terminal(
socket,
cred,
@@ -695,7 +702,8 @@ async fn main() -> Result<()> {
false,
None,
)
.await
.await,
)
}
fn run_trust_command(config: &dosh::config::ClientConfig, args: &Args) -> Result<()> {
@@ -6495,6 +6503,13 @@ fn terminal_input_channel() -> (mpsc::Sender<Vec<u8>>, mpsc::Receiver<Vec<u8>>)
mpsc::channel(STDIN_QUEUE_CAPACITY)
}
fn trace_terminal_result(result: Result<()>) -> Result<()> {
if let Err(err) = &result {
dosh::trace::event("client.terminal_error", &[("error", format!("{err:#}"))]);
}
result
}
#[allow(clippy::too_many_arguments)]
async fn run_terminal(
socket: UdpSocket,