From ffab6e2b0011fae44b0d9c4fc0b8b5e2851eb9bc Mon Sep 17 00:00:00 2001 From: Karen Chen <64801825+karenc-bq@users.noreply.github.com> Date: Thu, 8 Jan 2026 12:09:19 -0800 Subject: [PATCH] fix: remove attached error listeners when ending connections --- pg/lib/abstract_pg_error_handler.ts | 1 - pg/lib/client.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pg/lib/abstract_pg_error_handler.ts b/pg/lib/abstract_pg_error_handler.ts index 9a5799c0..e5dcfa14 100644 --- a/pg/lib/abstract_pg_error_handler.ts +++ b/pg/lib/abstract_pg_error_handler.ts @@ -18,7 +18,6 @@ import { ErrorHandler } from "../../common/lib/error_handler"; import { ClientWrapper } from "../../common/lib/client_wrapper"; import { logger } from "../../common/logutils"; import { Messages } from "../../common/lib/utils/messages"; -import { error } from "winston"; export abstract class AbstractPgErrorHandler implements ErrorHandler { protected unexpectedError: Error | null = null; diff --git a/pg/lib/client.ts b/pg/lib/client.ts index d966f2e7..4517e165 100644 --- a/pg/lib/client.ts +++ b/pg/lib/client.ts @@ -171,6 +171,7 @@ class BaseAwsPgClient extends AwsClient implements PGClient { this.properties, "end", () => { + this.pluginService.removeErrorListener(this.targetClient); const res = this.targetClient!.end(); this.targetClient = undefined; this.isConnected = false;