dns: do not log socket close during shutdown

This commit is contained in:
Frank Schroeder 2017-05-23 12:16:18 +02:00
parent 1df74e36bd
commit 3e39f04527
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}