X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=src%2Fdb%2Fpostgres%2Flistener.js;h=4baf5d082de3bc1d507ef441ddc795af014e8470;hb=8845c9b8d6031256cfaea749845026d5f6166ea6;hp=6ad387aa49ea2e11a91e29a6de60094eea4024aa;hpb=ad5e19413b7f003abc61d12a5ff9dbcf20065c65;p=websub-hub diff --git a/src/db/postgres/listener.js b/src/db/postgres/listener.js index 6ad387a..4baf5d0 100644 --- a/src/db/postgres/listener.js +++ b/src/db/postgres/listener.js @@ -54,7 +54,7 @@ class PostgresListener { delete this.reconnectPending; } if (this.connection) { - this.connection.client.removeListener(this.notificationEventName, this.onNotificationBound); + this.connection.client.removeListener(this.notificationEventName, this._onNotificationBound); this.connection.done(); this.connection = null; await this.options.connectionLostCallback(); @@ -106,7 +106,7 @@ class PostgresListener { this.logger.error(_scope, 'listener connection lost', { error, event }); this.connection = null; try { - event.client.removeListener(this.notificationEventName, this.onNotificationBound); + event.client.removeListener(this.notificationEventName, this._onNotificationBound); } catch (e) { this.logger.error(_scope, 'failed to remove listener', { error: e }); // That's okay, it was probably just gone anyhow.