mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-19 05:50:41 +08:00
The sandbox SSH server used tokio::spawn fire-and-forget for each stdout/stderr chunk, which provided no ordering guarantee under tokio's work-stealing scheduler. Under load, chunks arrived out-of-order, corrupting tar streams during download. Replace tokio::spawn with runtime.block_on() to ensure each chunk is fully sent before reading the next. Remove AsyncWriteExt::shutdown() from the SSH proxy's copy helper to prevent gateways from treating TCP half-close as full-close and truncating in-flight downloads. Implement channel_eof handler on the sandbox SSH server to close the child process stdin when the client signals EOF. Without this, commands like 'cat | tar xf -' used by sync --up would hang waiting for stdin EOF indefinitely. Add ValueHint::AnyPath to the --up argument for shell completion.