Skip to content

Commit

Permalink
Update MongoClientHelpers.cs
Browse files Browse the repository at this point in the history
Enable heartbeat
  • Loading branch information
jas88 committed Nov 7, 2024
1 parent 2b1f136 commit 58fbc99
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 @@ private static MongoClient CreateMongoClient(MongoDbOptions options, string appl
ApplicationName = applicationName,
Servers = new List<MongoServerAddress>([new MongoServerAddress(options.HostName, options.Port)]),
WriteConcern = new WriteConcern(journal: !skipJournal),
DirectConnection = true
DirectConnection = true,
HeartbeatInterval = TimeSpan.FromSeconds(10)
};

if (skipAuthentication || options.UserName == string.Empty)
Expand Down

0 comments on commit 58fbc99

Please sign in to comment.