Mongo::Client created with ipv6 address encounters error when duplicated via #with

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 2.6.0
    • Affects Version/s: 2.5.0
    • Component/s: None
    • None
    • 0.5
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      To recreate:

       client = Mongo::Client.new(["[::1]:27017"])
       client.with(heartbeat_frequency: 20)
       NoMethodError: undefined method `[]' for nil:NilClass
        from mongo-ruby-driver/lib/mongo/address/ipv6.rb:51:in `parse'
      

      Reason is that the IPv6 class expects the address to be formatted with brackets but a ipv6 address object does not include the brackets when the host attribute is accessed. See Cluster#initialize when each seed is added.

            Assignee:
            Oleg Pudeyev (Inactive)
            Reporter:
            Emily Stolfo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: