From a5e8b4b404384201a72043ac596dc295f37ef4d6 Mon Sep 17 00:00:00 2001 From: Zachary Huff Date: Thu, 5 Jan 2017 20:05:51 -0500 Subject: [PATCH] Clear dns cache after update --- service/watch/watch.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/watch/watch.go b/service/watch/watch.go index 21b3afa8e..8a33a3022 100644 --- a/service/watch/watch.go +++ b/service/watch/watch.go @@ -134,6 +134,12 @@ func dnsWatch() { }).Error("watch: Failed to update DNS settings") } + utils.ClearDNSCache() + go func() { + time.Sleep(1 * time.Second) + utils.ClearDNSCache() + }() + restartLock.Unlock() reset = false } else {