fix: Add ctrl+c support in container terminal (#9951)

Refs #9125
This commit is contained in:
ssongliu 2025-08-11 18:30:44 +08:00 committed by GitHub
parent 6a8bd11fc9
commit d7013727b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {