Skip to content

Commit 2f837ff

Browse files
authored
fix: remove attached error listeners when ending connections (#600)
1 parent 781db35 commit 2f837ff

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

pg/lib/abstract_pg_error_handler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { ErrorHandler } from "../../common/lib/error_handler";
1818
import { ClientWrapper } from "../../common/lib/client_wrapper";
1919
import { logger } from "../../common/logutils";
2020
import { Messages } from "../../common/lib/utils/messages";
21-
import { error } from "winston";
2221

2322
export abstract class AbstractPgErrorHandler implements ErrorHandler {
2423
protected unexpectedError: Error | null = null;

pg/lib/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ class BaseAwsPgClient extends AwsClient implements PGClient {
171171
this.properties,
172172
"end",
173173
() => {
174+
this.pluginService.removeErrorListener(this.targetClient);
174175
const res = this.targetClient!.end();
175176
this.targetClient = undefined;
176177
this.isConnected = false;

0 commit comments

Comments
 (0)