We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccbfd55 commit 25bf8f4Copy full SHA for 25bf8f4
src/mongo_client.ts
@@ -795,10 +795,11 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> implements
795
return;
796
}
797
798
- const {
799
- description: { type, logicalSessionTimeoutMinutes }
800
- } = this.topology;
801
- if (type === TopologyType.LoadBalanced || logicalSessionTimeoutMinutes != null) {
+ const supportsSessions =
+ this.topology.description.type === TopologyType.LoadBalanced ||
+ this.topology.description.logicalSessionTimeoutMinutes != null;
+
802
+ if (supportsSessions) {
803
await endSessions(this, this.topology);
804
805
0 commit comments