We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c79802b commit 0677840Copy full SHA for 0677840
src/mongo_client.ts
@@ -501,6 +501,9 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
501
502
Promise.all(activeSessionEnds)
503
.then(() => {
504
+ if (this.topology == null) {
505
+ return;
506
+ }
507
// If we would attempt to select a server and get nothing back we short circuit
508
// to avoid the server selection timeout.
509
const selector = readPreferenceServerSelector(ReadPreference.primaryPreferred);
0 commit comments