MongoConnectionPool - Object reference not set to instance of object

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Windows 7 x64
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When closing a connection, getting "Object reference not set to instance of object". It's coming from MongoConnecitonPool.ReleaseConnection(MongoConnection connection):

      connection.LastUsedAt = DateTime.UtcNow;
      availableConnections.Add(connection);
      Monitor.Pulse(connectionPoolLock);

      Looks like this is getting called after the close method, which sets the availableConnections to null. I assume at this point that the connection is just being abandoned, and has already been close, I added an if statement to my code to make sure availableConnections wasn't null before adding it back to the pool. Not sure if that's the right answer.

              Assignee:
              Robert Stam
              Reporter:
              Joe Seymour
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: