maxcnunes / waitforit

Wait until an address become available.
MIT License
172 stars 26 forks source link

Address does not support IPv6 address #20

Closed ghost closed 6 years ago

ghost commented 6 years ago

I can't get -address to accept an IPv6 address with or without brackets. -host is fine.

maxcnunes commented 6 years ago

It could be because of the regex we use to resolve the address info. It has just been updated to use a new rule, could you check if that works for you on v2.2.1?

ghost commented 6 years ago

Hey!

Thanks for looking into this. No such luck.

$ /var/tmp/go/bin/waitforit -address http://[2001:41d0:8:6a52:298:2dff:fef3:8ce1]
2018/08/31 12:47:40 Invalid connection main.Config{Host:"", Port:80, Address:"http://[2001:41d0:8:6a52:298:2dff:fef3:8ce1]", Timeout:10, Retry:500}
$ /var/tmp/go/bin/waitforit -address http://2001:41d0:8:6a52:298:2dff:fef3:8ce1
2018/08/31 12:47:45 Invalid connection main.Config{Host:"", Port:80, Address:"http://2001:41d0:8:6a52:298:2dff:fef3:8ce1", Timeout:10, Retry:500}
$ /var/tmp/go/bin/waitforit -address tcp://[2001:41d0:8:6a52:298:2dff:fef3:8ce1]:22
2018/08/31 12:47:48 Invalid connection main.Config{Host:"", Port:80, Address:"tcp://[2001:41d0:8:6a52:298:2dff:fef3:8ce1]:22", Timeout:10, Retry:500}
maxcnunes commented 6 years ago

Thanks for checking it out. I have just fixed it on https://github.com/maxcnunes/waitforit/commit/1de194e5575614f89bf4d40a3eb38205bfb2e6c7 and I will release it later this weekend.