Pārlūkot izejas kodu

StatHat configuration can change at runtime

.. so always setup the recent counters if there's an ApiKey configured.

(Also with go 1.5 this prevents a crash)
Ask Bjørn Hansen 10 gadi atpakaļ
vecāks
revīzija
8186f978c9
1 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  1. 2 4
      stathat.go

+ 2 - 4
stathat.go

@@ -23,10 +23,8 @@ func (zs *Zones) statHatPoster() {
 	lastEdnsCounts := map[string]int64{}
 
 	for name, zone := range *zs {
-		if zone.Logging.StatHat == true {
-			lastCounts[name] = zone.Metrics.Queries.Count()
-			lastEdnsCounts[name] = zone.Metrics.EdnsQueries.Count()
-		}
+		lastCounts[name] = zone.Metrics.Queries.Count()
+		lastEdnsCounts[name] = zone.Metrics.EdnsQueries.Count()
 	}
 
 	for {