diff --git a/internal/handlers/home.go b/internal/handlers/home.go index 433aaa0..b18daa3 100644 --- a/internal/handlers/home.go +++ b/internal/handlers/home.go @@ -199,7 +199,9 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) { efficiency := response.ServedMB * 100 / denominator if zr.initialTraffic.Load() > response.TrafficLogged { - zr.initialTraffic.Store(response.TrafficLogged) + // it cannot be bigger than traffic logged + // so it must be a reset back to 0 + zr.initialTraffic.Store(0) } out += fmt.Sprintf(`