Create a close method on the MongoClient.
I have run into a situation where threads are not being garbage collected and are causing a serious issue. When we create a database for a specific user, we generate the users’ credentials inside of that database with access only to that database. The problem arises when we need to delete the user and database. The user sometime in the past connected to MongoDB using their credentials which leaves behind an open thread to the MongoDB that is logging into MongoDB once a minute with that users’ credentials. We then come along with our Admin user account and delete the user from the database and then delete the database. This causes the open thread using the now deleted user to start retrying to login using the now deleted users’ credentials over and over every .015 seconds. Our log file store area, about 30Gb fills up within a day with the MongoDB log spew. We need a way to kill a thread once its job is complete, so we don’t get into these runaway situations. I have read that other MongoDB drivers, namely the Java driver, can close the MongoClient. The C# Driver needs the same functionality desperately.Another option is to have the MongoClient stop the thread after 5 try's when the error coming back is user not found.