Fix garbage removal pafter SSH failure not working on macOS when run more than once

This commit is contained in:
Kovid Goyal 2022-03-15 11:57:28 +05:30
parent e8437fd435
commit 6057c57ea4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -516,7 +516,6 @@ def drain_potential_tty_garbage(p: 'subprocess.Popen[bytes]', data_request: str)
# discard queued input data on tty in case data transmission was
# interrupted due to SSH failure, avoids spewing garbage to
# screen
termios.tcflush(tty.fileno(), termios.TCIFLUSH)
data = b''
give_up_at = time.monotonic() + 1
tty_fd = tty.fileno()