fix: if you exit a container manually, it should close the underlying tty as well
This commit is contained in:
parent
07ed726c88
commit
595a2414b1
1 changed files with 3 additions and 4 deletions
|
|
@ -118,9 +118,8 @@ function flowControlCallback() {
|
||||||
socket.send(JSON.stringify({
|
socket.send(JSON.stringify({
|
||||||
message: data
|
message: data
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Type CTRL + D or exit in the terminal
|
// Type CTRL + D or exit in the terminal
|
||||||
if (data === '\x04' || (data === '\r' && stripAnsiCommands(commandBuffer).trim() === 'exit')) {
|
if (data === '\x04' || (data === '\r' && stripAnsiCommands(commandBuffer).trim().includes('exit'))) {
|
||||||
checkIfProcessIsRunningAndKillIt();
|
checkIfProcessIsRunningAndKillIt();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$data.terminalActive = false;
|
$data.terminalActive = false;
|
||||||
|
|
@ -215,8 +214,8 @@ function checkIfProcessIsRunningAndKillIt() {
|
||||||
term.resize(termWidth, termHeight);
|
term.resize(termWidth, termHeight);
|
||||||
socket.send(JSON.stringify({
|
socket.send(JSON.stringify({
|
||||||
resize: {
|
resize: {
|
||||||
cols: 600,
|
cols: termWidth,
|
||||||
rows: 600
|
rows: termHeight
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue