Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-449

MongoServer.VerifyInstances modifies collection that is being iterated

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.2
    • Affects Version/s: 1.4.1
    • Component/s: None
    • None
    • Fully Compatible

      The MongoServer.VerifyInstances iterates over the _instances member. Unfortunately, it occasionally calls RemoveInstance (when list is updated). This leads to _instances list to be updated and iteration to fail. I think snapshotting a list of instances with ToArray() call would be enough.

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: