From b0a57f34d5b4aaa470bcb5007baea0035506e2dd Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Thu, 24 Oct 2024 09:26:09 -0500 Subject: [PATCH] Update MongoClientHelpers.cs Try with DirectConnection = true --- src/SmiServices/Common/MongoDB/MongoClientHelpers.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SmiServices/Common/MongoDB/MongoClientHelpers.cs b/src/SmiServices/Common/MongoDB/MongoClientHelpers.cs index 05cc7dcae..557af5d54 100644 --- a/src/SmiServices/Common/MongoDB/MongoClientHelpers.cs +++ b/src/SmiServices/Common/MongoDB/MongoClientHelpers.cs @@ -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);