From a2aab715ed65988fb96a6fd0f500994b5b37a4fd Mon Sep 17 00:00:00 2001 From: Nicolas Dextraze Date: Wed, 17 Jan 2018 11:29:24 -0800 Subject: [PATCH] Fix potential error handling bug due to missing EventEmitter.call(this) in EventStoreNodeConnection and EventStoreConnectionLogicHandler --- src/core/eventStoreConnectionLogicHandler.js | 1 + src/eventStoreNodeConnection.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/core/eventStoreConnectionLogicHandler.js b/src/core/eventStoreConnectionLogicHandler.js index cda53ba..41f191b 100644 --- a/src/core/eventStoreConnectionLogicHandler.js +++ b/src/core/eventStoreConnectionLogicHandler.js @@ -43,6 +43,7 @@ const EmptyGuid = '00000000-0000-0000-0000-000000000000'; * @property {Number} totalOperationCount */ function EventStoreConnectionLogicHandler(esConnection, settings) { + EventEmitter.call(this); this._esConnection = esConnection; this._settings = settings; this._queue = new SimpleQueuedHandler(); diff --git a/src/eventStoreNodeConnection.js b/src/eventStoreNodeConnection.js index ac8fce6..208ccc5 100644 --- a/src/eventStoreNodeConnection.js +++ b/src/eventStoreNodeConnection.js @@ -37,6 +37,7 @@ const MaxReadSize = 4096; * @constructor */ function EventStoreNodeConnection(settings, clusterSettings, endpointDiscoverer, connectionName) { + EventEmitter.call(this); this._connectionName = connectionName || ['ES-', uuid.v4()].join(''); this._settings = settings; this._clusterSettings = clusterSettings;