Skip to content

Commit

Permalink
consolidate logic
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jun 1, 2023
1 parent 5887f33 commit 473f310
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/mongo_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,7 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {

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 {
Expand Down

0 comments on commit 473f310

Please sign in to comment.