aboutsummaryrefslogtreecommitdiff
path: root/plugin/hosts/setup.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/hosts/setup.go')
-rw-r--r--plugin/hosts/setup.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/hosts/setup.go b/plugin/hosts/setup.go
index 26c3c82d3..73fd3cec4 100644
--- a/plugin/hosts/setup.go
+++ b/plugin/hosts/setup.go
@@ -26,7 +26,7 @@ func init() {
func periodicHostsUpdate(h *Hosts) chan bool {
parseChan := make(chan bool)
- if h.options.reload == durationOf0s {
+ if h.options.reload == 0 {
return parseChan
}
@@ -78,7 +78,7 @@ func hostsParse(c *caddy.Controller) (Hosts, error) {
h := Hosts{
Hostsfile: &Hostsfile{
path: "/etc/hosts",
- hmap: newHostsMap(),
+ hmap: newMap(),
options: options,
},
}
@@ -152,7 +152,7 @@ func hostsParse(c *caddy.Controller) (Hosts, error) {
if err != nil {
return h, c.Errf("invalid duration for reload '%s'", remaining[0])
}
- if reload < durationOf0s {
+ if reload < 0 {
return h, c.Errf("invalid negative duration for reload '%s'", remaining[0])
}
options.reload = reload