Reset back to 0
This commit is contained in:
@@ -199,7 +199,9 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
|||||||
efficiency := response.ServedMB * 100 / denominator
|
efficiency := response.ServedMB * 100 / denominator
|
||||||
|
|
||||||
if zr.initialTraffic.Load() > response.TrafficLogged {
|
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(`
|
out += fmt.Sprintf(`
|
||||||
|
|||||||
Reference in New Issue
Block a user