Skip to content

Commit

Permalink
Update MongoClientHelpers.cs
Browse files Browse the repository at this point in the history
Try with DirectConnection = true
  • Loading branch information
jas88 committed Oct 24, 2024
1 parent 55e329c commit b0a57f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SmiServices/Common/MongoDB/MongoClientHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public static MongoClient GetMongoClient(MongoDbOptions options, string applicat
ApplicationName = applicationName,
Credential = credentials,
Server = new MongoServerAddress(options.HostName, options.Port),
WriteConcern = new WriteConcern(journal: !skipJournal)
WriteConcern = new WriteConcern(journal: !skipJournal),
DirectConnection = true
};

var client = new MongoClient(mongoClientSettings);
Expand Down

0 comments on commit b0a57f3

Please sign in to comment.