From a57409db13e53a0f143a1f41b3b7e16132cbe67f Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 9 Oct 2021 13:23:48 -0700 Subject: [PATCH] Get rid of IP address sanity check. Allow the router to return any binding errors directly. Closes #1398 --- router/router.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/router/router.go b/router/router.go index a14f59ba2..2a71f97e8 100644 --- a/router/router.go +++ b/router/router.go @@ -2,7 +2,6 @@ package router import ( "fmt" - "net" "net/http" log "github.com/sirupsen/logrus" @@ -241,12 +240,8 @@ func Start() error { port := config.WebServerPort ip := config.WebServerIP - ipAddr := net.ParseIP(ip) - if ipAddr == nil { - log.Fatalln("Invalid IP address", ip) - } - log.Infof("Web server is listening on IP %s port %d.", ipAddr.String(), port) + log.Infof("Web server is listening on IP %s port %d.", ip, port) log.Infoln("The web admin interface is available at /admin.") - return http.ListenAndServe(fmt.Sprintf("%s:%d", ipAddr.String(), port), nil) + return http.ListenAndServe(fmt.Sprintf("%s:%d", ip, port), nil) }