From d7013727b9c109aea6cf4c92198b411a1643abfb Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 11 Aug 2025 18:30:44 +0800 Subject: [PATCH] fix: Add ctrl+c support in container terminal (#9951) Refs #9125 --- agent/utils/terminal/ws_local_session.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agent/utils/terminal/ws_local_session.go b/agent/utils/terminal/ws_local_session.go index 2669cc232..da7c1ab36 100644 --- a/agent/utils/terminal/ws_local_session.go +++ b/agent/utils/terminal/ws_local_session.go @@ -108,9 +108,7 @@ func (sws *LocalWsSession) receiveWsMsg(exitCh chan bool) { if err != nil { global.LOG.Errorf("websock cmd string base64 decoding failed, err: %v", err) } - if string(decodeBytes) != "\x03" || sws.allowCtrlC { - sws.sendWebsocketInputCommandToSshSessionStdinPipe(decodeBytes) - } + sws.sendWebsocketInputCommandToSshSessionStdinPipe(decodeBytes) case WsMsgHeartbeat: err = wsConn.WriteMessage(websocket.TextMessage, wsData) if err != nil {