Fall back to the seed host instead of uri

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 2.11.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      When the driver reports no server address, the fallback uses uri. isLocalhost and isDigitalOcean expect a hostname, not a URI.

      • Add extractHostname, which strips the port from a host:port address and unwraps IPv6, returning undefined for hostname-less values like '' and ':27017'.
      • Add getResolvedHostname, which prefers resolvedHostname and falls back to connectionString.hosts[0].

            Assignee:
            Alena Khineika
            Reporter:
            Alena Khineika
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: