don't resize dead PTYs

This commit is contained in:
Eugene Pankov 2017-07-05 15:33:41 +02:00
parent 536d9537ff
commit 709ffadc7c

View file

@ -68,11 +68,15 @@ export class Session {
} }
resize (columns, rows) { resize (columns, rows) {
this.pty.resize(columns, rows) if (this.pty.writable) {
this.pty.resize(columns, rows)
}
} }
write (data) { write (data) {
this.pty.write(Buffer.from(data, 'utf-8')) if (this.pty.writable) {
this.pty.write(Buffer.from(data, 'utf-8'))
}
} }
kill (signal?: string) { kill (signal?: string) {