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;