Fix rare crash if client terms in door

This commit is contained in:
Bryan Ashby 2016-08-30 09:53:35 -06:00
parent 64ded2514c
commit 48aa0fa606
1 changed files with 5 additions and 2 deletions

View File

@ -50,10 +50,13 @@ class TelnetClientConnection extends EventEmitter {
if(!this.pipeRestored) {
this.pipeRestored = true;
// client may have bailed
if(_.has(this, 'client.term.output')) {
this.client.term.output.unpipe(this.bridgeConnection);
this.client.term.output.resume();
}
}
}
connect(connectOpts) {
this.bridgeConnection = net.createConnection(connectOpts, () => {