mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 05:38:41 -09:00
Fix session exiting (#560)
* Fix session exiting * Restore original flow and just remove listeners on session when exiting * Prevent sending data from pty after session exited
This commit is contained in:
parent
445306c0cc
commit
f0b049b2e3
1 changed files with 3 additions and 0 deletions
|
|
@ -43,6 +43,9 @@ module.exports = class Session extends EventEmitter {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.pty.stdout.on('data', (data) => {
|
this.pty.stdout.on('data', (data) => {
|
||||||
|
if (this.ended) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.emit('data', data.toString('utf8'));
|
this.emit('data', data.toString('utf8'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue