From b3ff2d655a9c4d267481cd4dd57c82be7e65592d Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Sat, 6 Dec 2014 11:12:45 +0000 Subject: [PATCH] fix --- server/server.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/server/server.go b/server/server.go index 624270b..6c2308f 100644 --- a/server/server.go +++ b/server/server.go @@ -63,13 +63,15 @@ func NewServer(cfg *ServerConfig) (s *Server, err error) { s.cfg.canonicalNameservers[i] = dns.Fqdn(s.cfg.canonicalNameservers[i]) } - vanityIPs := strings.Split(s.cfg.VanityIPs, ",") - for _, ips := range vanityIPs { - ip := net.ParseIP(ips) - if ip == nil { - return nil, fmt.Errorf("Couldn't parse IP: %s", ips) + if s.cfg.VanityIPs != "" { + vanityIPs := strings.Split(s.cfg.VanityIPs, ",") + for _, ips := range vanityIPs { + ip := net.ParseIP(ips) + if ip == nil { + return nil, fmt.Errorf("Couldn't parse IP: %s", ips) + } + s.cfg.vanityIPs = append(s.cfg.vanityIPs, ip) } - s.cfg.vanityIPs = append(s.cfg.vanityIPs, ip) } s.namecoinConn = namecoin.Conn{