Merge branch 'master' of ssh://numinibsd/git/base/enigma-bbs
This commit is contained in:
commit
35105f2a7c
10
core/door.js
10
core/door.js
|
@ -47,10 +47,13 @@ Door.prototype.run = function() {
|
||||||
self.client.term.write(decode(data, self.exeInfo.encoding));
|
self.client.term.write(decode(data, self.exeInfo.encoding));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var restored = false;
|
||||||
|
|
||||||
var restore = function(piped) {
|
var restore = function(piped) {
|
||||||
if(self.client.term.output) {
|
if(!restored && self.client.term.output) {
|
||||||
self.client.term.output.unpipe(piped);
|
self.client.term.output.unpipe(piped);
|
||||||
self.client.term.output.resume();
|
self.client.term.output.resume();
|
||||||
|
restored = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -133,6 +136,11 @@ Door.prototype.run = function() {
|
||||||
sockServer.close();
|
sockServer.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we may not get a close
|
||||||
|
if('stdio' === self.exeInfo.io) {
|
||||||
|
restore(door);
|
||||||
|
}
|
||||||
|
|
||||||
door.removeAllListeners();
|
door.removeAllListeners();
|
||||||
|
|
||||||
self.emit('finished');
|
self.emit('finished');
|
||||||
|
|
Loading…
Reference in New Issue