From 21b54eda7eceb4747bacffe78bc43f1c5ed70c58 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 29 Jan 2019 21:31:39 -0700 Subject: [PATCH] Fix interrupt bug when connecting over SSH with multi-node --- core/user_interrupt_queue.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/core/user_interrupt_queue.js b/core/user_interrupt_queue.js index f1aee626..67b880c8 100644 --- a/core/user_interrupt_queue.js +++ b/core/user_interrupt_queue.js @@ -47,13 +47,17 @@ module.exports = class UserInterruptQueue // pause defaulted on interruptItem.pause = _.get(interruptItem, 'pause', true); - this.client.currentMenuModule.attemptInterruptNow(interruptItem, (err, ateIt) => { - if(err) { - // :TODO: Log me - } else if(true !== ateIt) { - this.queue.push(interruptItem); - } - }); + try { + this.client.currentMenuModule.attemptInterruptNow(interruptItem, (err, ateIt) => { + if(err) { + // :TODO: Log me + } else if(true !== ateIt) { + this.queue.push(interruptItem); + } + }); + } catch(e) { + this.queue.push(interruptItem); + } } hasItems() {