From 06974973a33994c7e7f1710efd8814d88b389b66 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 7 Dec 2015 21:43:37 -0700 Subject: [PATCH] * Make keyboard input trace optional * Ensure term exists before calling disconnect() --- core/client.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/client.js b/core/client.js index baf706ab..25fd3874 100644 --- a/core/client.js +++ b/core/client.js @@ -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();