From 3e39f04527d0993b3b49464800a69b354d322e2c Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Tue, 23 May 2017 12:16:18 +0200 Subject: [PATCH] dns: do not log socket close during shutdown --- command/agent/dns.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/agent/dns.go b/command/agent/dns.go index 0c023d0903..4b9d69eb35 100644 --- a/command/agent/dns.go +++ b/command/agent/dns.go @@ -114,14 +114,14 @@ func NewDNSServer(agent *Agent, config *DNSConfig, logOutput io.Writer, domain s // Async start the DNS Servers, handle a potential error errCh := make(chan error, 2) go func() { - if err := server.ListenAndServe(); err != nil { + if err := server.ListenAndServe(); err != nil && !strings.Contains(err.Error(), "accept") { srv.logger.Printf("[ERR] dns: error starting udp server: %v", err) errCh <- fmt.Errorf("dns udp setup failed: %v", err) } }() go func() { - if err := serverTCP.ListenAndServe(); err != nil { + if err := serverTCP.ListenAndServe(); err != nil && !strings.Contains(err.Error(), "accept") { srv.logger.Printf("[ERR] dns: error starting tcp server: %v", err) errCh <- fmt.Errorf("dns tcp setup failed: %v", err) }