Skip to content

Commit f04fbd4

Browse files
committed
chore: error and checkin
1 parent 6674aa8 commit f04fbd4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cmap/connection_pool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,12 +485,12 @@ export class ConnectionPool extends TypedEventEmitter<ConnectionPoolEvents> {
485485
for (const connection of this.checkedOut) {
486486
if (connection.generation <= minGeneration) {
487487
connection.onError(new PoolClearedOnNetworkError(this));
488-
this.checkIn(connection);
489488
}
490489
}
491490
}
492491

493-
closeCheckedOutConnections() {
492+
/** For MongoClient.close() procedures */
493+
public closeCheckedOutConnections() {
494494
for (const conn of this.checkedOut) {
495495
conn.onError(new MongoClientClosedError());
496496
}

src/error.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,8 @@ export class MongoClientClosedError extends MongoAPIError {
10371037
*
10381038
* @public
10391039
**/
1040-
constructor(message = 'Operation interrupted because client was closed') {
1041-
super(message);
1040+
constructor() {
1041+
super('Operation interrupted because client was closed');
10421042
}
10431043

10441044
override get name(): string {

0 commit comments

Comments
 (0)