mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Use pty.onData and pty.onExit instead of deprecated .on() methods
This commit is contained in:
parent
eaab187a0c
commit
e7124efa61
1 changed files with 2 additions and 2 deletions
|
|
@ -131,7 +131,7 @@ module.exports = class Session extends EventEmitter {
|
|||
}
|
||||
|
||||
this.batcher = new DataBatcher(uid);
|
||||
this.pty.on('data', chunk => {
|
||||
this.pty.onData(chunk => {
|
||||
if (this.ended) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -142,7 +142,7 @@ module.exports = class Session extends EventEmitter {
|
|||
this.emit('data', data);
|
||||
});
|
||||
|
||||
this.pty.on('exit', () => {
|
||||
this.pty.onExit(() => {
|
||||
if (!this.ended) {
|
||||
this.ended = true;
|
||||
this.emit('exit');
|
||||
|
|
|
|||
Loading…
Reference in a new issue