Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pg/lib/abstract_pg_error_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions pg/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ class BaseAwsPgClient extends AwsClient implements PGClient {
this.properties,
"end",
() => {
this.pluginService.removeErrorListener(this.targetClient);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual method of removeErrorListener only removes the trackingListener - would it be cleaner to remove the noOpListener as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noOp listeners are only attached during the execution pipeline, so they should already be removed at the end of the application. end() may be called during the execution pipeline (PluginManager#execute()), so I want to avoid accidentally removing the listeners during the workflow.

const res = this.targetClient!.end();
this.targetClient = undefined;
this.isConnected = false;
Expand Down