-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.6
-
Component/s: None
-
None
-
Fully Compatible
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.