diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 890cba90d9..78eb626b30 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -450,9 +450,7 @@ export class MongoClient extends TypedEventEmitter { return maybeCallback(async () => { try { - if (this.connectionLock) return await this.connectionLock; - - this.connectionLock = this._connect(); + this.connectionLock = this.connectionLock ?? this._connect(); await this.connectionLock; return this; } finally {