Skip to content

Commit

Permalink
Propagate pool cluster remove event and don't propegate events that d…
Browse files Browse the repository at this point in the history
…on't happen
  • Loading branch information
Michael03 committed Jul 6, 2023
1 parent 446d658 commit 142cb6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion promise.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export interface PoolCluster extends EventEmitter {

on(event: string, listener: (args: any[]) => void): this;
on(event: 'remove', listener: (nodeId: number) => void): this;
on(event: 'connection', listener: (connection: PoolConnection) => void): this;
on(event: 'warn', listener: (err: Error) => void): this;
}

export function createConnection(connectionUri: string): Promise<Connection>;
Expand Down
2 changes: 1 addition & 1 deletion promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ class PromisePoolCluster extends EventEmitter {
super();
this.poolCluster = poolCluster;
this.Promise = thePromise || Promise;
inheritEvents(poolCluster, this, ['acquire', 'connection', 'enqueue', 'release']);
inheritEvents(poolCluster, this, ['warn', 'remove']);
}

getConnection() {
Expand Down

0 comments on commit 142cb6a

Please sign in to comment.