From 91f8ab0549f07815a0d72301d9b60bc903338ba3 Mon Sep 17 00:00:00 2001 From: Aleksey Dmitrevskiy Date: Thu, 28 Feb 2019 15:18:51 +0300 Subject: [PATCH] [change] control: Remove unuseful check --- control.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/control.go b/control.go index 85775c1d..7b17321b 100644 --- a/control.go +++ b/control.go @@ -329,15 +329,13 @@ func handleSetUpstreamConfig(w http.ResponseWriter, r *http.Request) { // bootstrap servers are plain DNS only. We should remove tls:// https:// and sdns:// hosts from slice bootstraps := []string{} - if len(newconfig.bootstrapDNS) > 0 { - for _, host := range newconfig.bootstrapDNS { - err := checkBootstrapDNS(host) - if err != nil { - log.Tracef("%s can not be used as bootstrap DNS cause: %s", host, err) - continue - } - bootstraps = append(bootstraps, host) + for _, host := range newconfig.bootstrapDNS { + err := checkBootstrapDNS(host) + if err != nil { + log.Tracef("%s can not be used as bootstrap DNS cause: %s", host, err) + continue } + bootstraps = append(bootstraps, host) } config.DNS.BootstrapDNS = defaultBootstrap