Skip to content

Commit f93126c

Browse files
committed
clean up endSessions silencing
1 parent 60a5335 commit f93126c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mongo_client.ts

Lines changed: 5 additions & 1 deletion
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)