From 3feddd5f68a3af2b5a403d96ecb4c11dd6e4398d Mon Sep 17 00:00:00 2001 From: Unrud Date: Sat, 29 Jan 2022 11:04:21 +0100 Subject: [PATCH] Ignore unparseable IP --- host.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/host.go b/host.go index 14ed821..022938e 100644 --- a/host.go +++ b/host.go @@ -53,10 +53,9 @@ func FindDefaultHost() string { panic(err) } ip := net.ParseIP(host) - if ip == nil { - panic("Invalid IP address: " + host) + if ip != nil { + addIP(100, ip) } - addIP(100, ip) } interfaces, _ := net.Interfaces() for _, inter := range interfaces {