Only transfer a zone once (#117)

Use sync.Once to only transfer a zone once.

Fixes #115
This commit is contained in:
Miek Gieben
2016-04-13 20:14:03 +01:00
parent 5a8a125399
commit 982377516b
3 changed files with 17 additions and 12 deletions

View File

@@ -1,6 +1,8 @@
package file
import (
"sync"
"github.com/miekg/coredns/middleware"
"github.com/miekg/coredns/middleware/file/tree"
@@ -14,6 +16,7 @@ type Zone struct {
*tree.Tree
TransferTo []string
StartupOnce sync.Once
TransferFrom []string
Expired *bool
}