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

MongoConnection#tcpClient might be null in MongoConnection.Close()

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 0.11
    • Affects Version/s: 1.0
    • Component/s: Performance
    • Labels:
      None

      MongoConnection#tcpClient might be null in MongoConnection.Close() leading to a bunch of handled NullReferenceExceptions (I encountered this when trying to connect to an incomplete replica set). While this does not affect functionality, debugging (especially online) and performance suffers from extra exceptions. I believe that a simple null check would solve the problem.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: