Don't clear the connection pool on Context timeout during handshake

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.5.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently we will clear the driver connection pool if we encounter any error during new connection handshake (see topology.Server#ProcessHandshakeError). If the error encountered is a driver-side timeout (e.g. a Context cancellation), that doesn't indicate a problem with connections in the pool like a network error does. Don't clear the connection pool in the case that the error encountered during new connection handshake is a driver-side timeout.

      E.g. similar logic from topology.Server#ProcessError:

      // ...
      if wrappedConnErr == context.Canceled || wrappedConnErr == context.DeadlineExceeded {
      	return driver.NoChange
      }
      // ...
      

            Assignee:
            Matt Dale
            Reporter:
            Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: