From e02c18b7bff399184dc8c749162356939fcaf078 Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Thu, 11 May 2023 01:52:51 +0900 Subject: [PATCH] disconnect --- src/Home/Telnet/Telnet.ZC | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Home/Telnet/Telnet.ZC b/src/Home/Telnet/Telnet.ZC index 41c49afd..3c411675 100755 --- a/src/Home/Telnet/Telnet.ZC +++ b/src/Home/Telnet/Telnet.ZC @@ -138,10 +138,11 @@ U0 InputTask(U0 *args) { } break; + case CH_ESC: + TCPSocketSendString(sock, 0x27); + break; case CH_SHIFT_ESC: force_disconnect = TRUE; - TCPSocketClose(sock); - "Telnet connection closed.\n"; break; // send buffer on enter case '\n': @@ -551,11 +552,12 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) { } // sock(CTCPSocket *)->timeout = 0; - while (TaskValidate(input_task)) + while (TaskValidate(input_task) && !force_disconnect) { Refresh; } + Kill(input_task); // sock(CTCPSocket *)->timeout = TCP_TIMEOUT; TCPSocketClose(sock); "Telnet connection closed.\n";