Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
2.6
-
None
-
None
-
Fully Compatible
Description
If the server returns an error when an exhaust cursor makes its initial query, a socket is leaked and the max_pool_size semaphore is never incremented:
collection.find({'$bad_query_operator': 1}, exhaust=True)
|
The bug is in both MongoClient and MongoReplicaSetClient.
A network error on an exhaust cursor's initial query, on the other hand, is handled correctly in MongoReplicaSetClient, but causes a leak in MongoClient.