From fa50c7d9fae4b09b39e84d0cb6694fa4c9a50f23 Mon Sep 17 00:00:00 2001 From: DehanLUO Date: Mon, 10 Jul 2023 02:10:54 -0400 Subject: [PATCH] Stop local echo when remote echo is on --- tabby-telnet/src/session.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tabby-telnet/src/session.ts b/tabby-telnet/src/session.ts index 8c3b1e9b..e094032a 100644 --- a/tabby-telnet/src/session.ts +++ b/tabby-telnet/src/session.ts @@ -174,9 +174,9 @@ export class TelnetSession extends BaseSession { ].includes(option)) { this.emitTelnet(TelnetCommands.DO, option) if (option === TelnetOptions.ECHO && this.streamProcessor.forceEcho) { - this.telnetRemoteEcho = true; - this.streamProcessor.forceEcho = false; - this.requestOption(TelnetCommands.WONT, option); + this.telnetRemoteEcho = true + this.streamProcessor.forceEcho = false + this.requestOption(TelnetCommands.WONT, option) } } else { this.logger.debug('(!) Unhandled option') @@ -189,7 +189,7 @@ export class TelnetSession extends BaseSession { this.emitSize() } else if (option === TelnetOptions.ECHO) { if (this.telnetRemoteEcho) { - this.streamProcessor.forceEcho = false; + this.streamProcessor.forceEcho = false this.emitTelnet(TelnetCommands.WONT, option) } else { this.streamProcessor.forceEcho = true @@ -213,7 +213,7 @@ export class TelnetSession extends BaseSession { } if (command === TelnetCommands.WONT) { if (option === TelnetOptions.ECHO) { - this.telnetRemoteEcho = false; + this.telnetRemoteEcho = false this.emitTelnet(TelnetCommands.DONT, option) } else { this.logger.debug('(!) Unhandled option')