Closed oyyd closed 3 years ago
Thanks for the great lib :)
When a client tries to connect to a nsqd behind an IPv6 address, the client would throw errors like:
Error: lookupdHTTPAddresses must be a list of addresses 'host:port' or HTTP/HTTPS URI
I think it's because passing ipv6 addresses, e.g. [::1]:4150 , to isBareAddress() would make it return false:
[::1]:4150
isBareAddress()
https://github.com/dudleycarr/nsqjs/blob/8956c69ad978452ffe9a7fd7c11dd276846aa324/lib/config.js#L38-L41
Feel free to close this PR if there is a better solution.
Thanks for the great lib :)
When a client tries to connect to a nsqd behind an IPv6 address, the client would throw errors like:
I think it's because passing ipv6 addresses, e.g.
[::1]:4150
, toisBareAddress()
would make it return false:https://github.com/dudleycarr/nsqjs/blob/8956c69ad978452ffe9a7fd7c11dd276846aa324/lib/config.js#L38-L41
Feel free to close this PR if there is a better solution.