ssh/tailssh: do not send EOT on session disconnection

This was assumed to be the fix for mosh not working, however turns out
all we really needed was the duplicate fd also introduced in the same
commit (af412e8874).

Fixes #5103

Signed-off-by: Maisem Ali <maisem@tailscale.com>
pull/5874/head
Maisem Ali 3 years ago committed by Maisem Ali
parent 82f5f438e0
commit b84ec521bf

@ -1037,9 +1037,6 @@ func (ss *sshSession) run() {
if _, err := io.Copy(rec.writer("i", ss.stdin), ss); err != nil { if _, err := io.Copy(rec.writer("i", ss.stdin), ss); err != nil {
logf("stdin copy: %v", err) logf("stdin copy: %v", err)
ss.ctx.CloseWithError(err) ss.ctx.CloseWithError(err)
} else if ss.ptyReq != nil {
const EOT = 4 // https://en.wikipedia.org/wiki/End-of-Transmission_character
ss.stdin.Write([]byte{EOT})
} }
}() }()
go func() { go func() {

Loading…
Cancel
Save