Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1556

Defensively set c.nc only if the error is nil

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.3
    • Affects Version/s: None
    • Component/s: Connections
    • Labels:
      None

      When connections are initialized, we should check the error and only set c.nc if error is nil. This is because we check if c.nc is nil to see if the connection has been opened, so we want to make sure we don't consider the connection opened if there was an error when dialing.

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: