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

Properly handle network errors in auth

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.1
    • Affects Version/s: 2.8
    • Component/s: None
    • Labels:
      None

      TestReplicaSetClientAuth.test_auth_network_error fails frequently on the v2.8 branch, only against MongoDB 3+.

      Likely MongoReplicaSetClient.__socket should catch all exceptions, not just OperationFailure, to return the closed socket to the pool before reraising:

      https://github.com/mongodb/mongo-python-driver/blob/v2.8/pymongo/mongo_replica_set_client.py#L1309

      But that alone does not fix the test, so there must be some other (additional?) cause.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: