diff --git a/cmd/start/control.go b/cmd/start/control.go index faebf4d..cddf98e 100644 --- a/cmd/start/control.go +++ b/cmd/start/control.go @@ -5,6 +5,7 @@ package start import ( "fmt" + "io" "os" "syscall" "time" @@ -36,7 +37,7 @@ func runControl(fifo string, con pty.Console) error { return fmt.Errorf("open fifo error: %w", err) } defer f.Close() - u := newConnUtils(f, f) + u := newConnUtils(f, io.Discard) _ = handleConn(u, con) } } @@ -47,6 +48,6 @@ func testUnixResize(fifo string) error { return fmt.Errorf("open fifo error: %w", err) } defer n.Close() - u := newConnUtils(n, n) + u := newConnUtils(nil, n) return testResize(u) } diff --git a/cmd/start/control_windows.go b/cmd/start/control_windows.go index b31f22d..2ac9ae2 100644 --- a/cmd/start/control_windows.go +++ b/cmd/start/control_windows.go @@ -2,6 +2,7 @@ package start import ( "fmt" + "io" "time" pty "github.com/MCSManager/pty/console" @@ -31,7 +32,7 @@ func runControl(fifo string, con pty.Console) error { } go func() { defer conn.Close() - u := newConnUtils(conn, conn) + u := newConnUtils(conn, io.Discard) _ = handleConn(u, con) }() } @@ -42,6 +43,6 @@ func testWinResize(fifo string) error { if err != nil { return fmt.Errorf("open fifo error: %w", err) } - u := newConnUtils(n, n) + u := newConnUtils(nil, n) return testResize(u) }