mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
revert terminal-api
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f1cce7ccaa
commit
99940f55ac
@ -144,6 +144,14 @@ export class TerminalApi extends WebSocketApi<TerminalEvents> {
|
||||
this.socket.binaryType = "arraybuffer";
|
||||
}
|
||||
|
||||
destroy() {
|
||||
if (!this.socket) return;
|
||||
const controlCode = String.fromCharCode(4); // ctrl+d
|
||||
|
||||
this.sendMessage({ type: TerminalChannels.STDIN, data: controlCode });
|
||||
setTimeout(() => super.destroy(), 2000);
|
||||
}
|
||||
|
||||
reconnect() {
|
||||
super.reconnect();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user