From df5aa0be29a027c8e50334f717a44ba1edee5540 Mon Sep 17 00:00:00 2001 From: haliphax Date: Mon, 1 Mar 2021 08:19:51 -0600 Subject: [PATCH] proc is still in scope, no need for cx prefix --- xthulu/ssh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xthulu/ssh.py b/xthulu/ssh.py index 01e8115..4b0e5e9 100644 --- a/xthulu/ssh.py +++ b/xthulu/ssh.py @@ -96,7 +96,7 @@ async def handle_client(proc: asyncssh.SSHServerProcess): if 'LANG' not in cx.proc.env or 'UTF-8' not in cx.proc.env['LANG']: cx.encoding = 'cp437' - termtype = cx.proc.get_terminal_type() + termtype = proc.get_terminal_type() w, h, pw, ph = proc.get_terminal_size() proc.env['TERM'] = termtype proc.env['COLS'] = w @@ -124,6 +124,7 @@ async def input_loop(): cx.echo(cx.term.bold_red_on_black('\r\nTimed out.\r\n')) log.warning(f'{cx.user.name}@{cx.sid} timed out') proc.close() + return except asyncssh.misc.TerminalSizeChanged as sz: