* Make keyboard input trace optional

* Ensure term exists before calling disconnect()
This commit is contained in:
Bryan Ashby 2015-12-07 21:43:37 -07:00
parent c010f0d85a
commit 06974973a3
1 changed files with 6 additions and 2 deletions

View File

@ -371,7 +371,9 @@ function Client(input, output) {
}
if(key || ch) {
self.log.trace( { key : key, ch : escape(ch) }, 'User keyboard input'); // jshint ignore:line
if(Config.logging.traceUserKeyboardInput) {
self.log.trace( { key : key, ch : escape(ch) }, 'User keyboard input'); // jshint ignore:line
}
self.lastKeyPressMs = Date.now();
@ -415,7 +417,9 @@ Client.prototype.startIdleMonitor = function() {
};
Client.prototype.end = function () {
this.term.disconnect();
if(this.term) {
this.term.disconnect();
}
var currentModule = this.menuStack.getCurrentModule();