diff options
-rw-r--r-- | cmd/zdns/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/zdns/main.go b/cmd/zdns/main.go index 0a9dacf..c8a13f4 100644 --- a/cmd/zdns/main.go +++ b/cmd/zdns/main.go @@ -105,12 +105,12 @@ func (c *cli) run() { sigHandler.OnClose(dnsSrv) c.runServer(dnsSrv) - httpSrv := http.NewServer(logger, config.DNS.ListenHTTP) - if httpSrv != nil { + // HTTP server + if config.DNS.ListenHTTP != "" { + httpSrv := http.NewServer(logger, config.DNS.ListenHTTP) sigHandler.OnClose(httpSrv) c.runServer(httpSrv) } - c.wg.Wait() } |