Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2092

MongoClient.close may create new connections

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.10.1
    • Affects Version/s: 3.5, 3.6, 3.7, 3.8, 3.9, 3.10
    • Component/s: None
    • None

      Discovered while investigating PYTHON-2089; MongoClient.close may actually create new connections during the call to MongoClient._process_periodic_tasks() which in turn calls Topology.update_pool(). This is useless work since the newly created connections are immediately closed. To fix this we should avoid calling Topology.update_pool() when closing a MongoClient.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: