From 4ae4c1e010910d69ecb25aee154f3e081dbbefa5 Mon Sep 17 00:00:00 2001 From: Jonathan Dextraze Date: Thu, 6 Jun 2019 11:42:22 -0700 Subject: [PATCH] Fix error with logging in SimpleQueuedHandler handler --- src/core/simpleQueuedHandler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/simpleQueuedHandler.js b/src/core/simpleQueuedHandler.js index 26b380c..8cb306a 100644 --- a/src/core/simpleQueuedHandler.js +++ b/src/core/simpleQueuedHandler.js @@ -13,11 +13,12 @@ function SimpleQueuedHandler(log) { SimpleQueuedHandler.prototype.registerHandler = function(type, handler) { var typeId = typeName(type); + var log = this._log; this._handlers[typeId] = function (msg) { try { handler(msg); } catch(e) { - this._log.error('handle for', type, 'failed:', e.stack); + log.error('handle for', type, 'failed:', e.stack); } }; };