The driver in some cases will throw an IllegalStateException indicating that the MongoClient has been closed, even in situations where it's not necessary. For example, the check is made in DBTCPConnector.releasePort, which is called in a number of places after an operation is completed.
It would be better just to allow those in-flight operations to complete normally and not throw.
- related to
-
JAVA-1579 Unclear API
- Closed