Dont require an IP address being set

Per default our server address is listening on all IP addresses on the machine.
This caused our preflight check to fail, as it did not have an hostname to lookup.
With this change, we are fine with this and go ahead.

Change-Id: I9eb5c891c099eb35f679d6d7e79ec38bb43b619f
This commit is contained in:
Stefan Benten 2020-01-28 15:25:17 +01:00
parent 4e819c196b
commit 3abb8c8ed7

View File

@ -133,7 +133,9 @@ func isAddressValid(addrstring string) error {
if err != nil || port == "" {
return errs.New("split host-port %q failed: %+v", addrstring, err)
}
if addr == "" {
return nil
}
resolvedhosts, err := net.LookupHost(addr)
if err != nil || len(resolvedhosts) == 0 {
return errs.New("lookup %q failed: %+v", addr, err)