Optimize tcp_simple endpoint integration

This commit is contained in:
Michael Mikovsky
2026-06-01 15:54:17 -06:00
parent 9ab130a620
commit 641ee7682a
14 changed files with 43 additions and 18 deletions
+2 -2
View File
@@ -74,7 +74,6 @@ impl ShellSession {
fn spawn(hook_id: HookID) -> Result<Self, SessionInitError> {
let child = Command::new("/bin/bash")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn()
.map_err(|_| SessionInitError::rejected())?;
@@ -116,7 +115,8 @@ impl Session<ShellState> for ShellSession {
incoming: &mut PacketQueue,
_endpoint: &mut Endpoint,
) -> SessionStatus {
while let Some(packet) = incoming.pop_front() {
while !incoming.is_empty() {
let packet = incoming.remove(0);
if packet.end_hook {
session.close_stdin();
}