Skip to content

Commit 22807e2

Browse files
committed
fix issue with Ping iterating over a non thread-safe collection.
1 parent 12fe80e commit 22807e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Driver/Core/MongoServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ public virtual bool IsDatabaseNameValid(string databaseName, out string message)
967967
/// </summary>
968968
public virtual void Ping()
969969
{
970-
foreach (var instance in _instances.ToArray())
970+
foreach (var instance in Instances)
971971
{
972972
instance.Ping();
973973
}

0 commit comments

Comments
 (0)