Skip to content

Commit a54b2ef

Browse files
committed
clean up endSessions silencing
1 parent 0b52dd0 commit a54b2ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mongo_client.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,11 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
646646
try {
647647
await withSessionCallback(session);
648648
} finally {
649-
session.endSession().catch(() => null);
649+
try {
650+
await session.endSession();
651+
} catch {
652+
// We are not concerned with errors from endSession()
653+
}
650654
}
651655
}, null);
652656
}

0 commit comments

Comments
 (0)