Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1298

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

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

      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@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            emily.stolfo Emily Stolfo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: