-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:Windows 7 x64
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.