GNU/Linux: Backport from 2.1.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka
2021-02-16 14:53:24 +09:00
parent 91ddc8fd02
commit 9b822282f0
3 changed files with 23 additions and 2 deletions

View File

@@ -179,7 +179,14 @@ main (int argc, const char *argv[])
if (size < 0)
goto connection_loop;
if (size == 1)
if (size == 0)
/* Timeout */
{
if (tty_send (tty, "\r\n", 2) < 0)
return 0;
break;
}
else if (size == 1)
/* Do nothing but prompt again. */
break;
else if (size)