fix to latency monitor reporting wrong max latency

in some cases LATENCY HISTORY reported latency that was
higher than the max latency reported by LATENCY LATEST / DOCTOR
This commit is contained in:
Oran Agra 2018-02-13 15:47:06 +02:00
parent 32ac4c64ba
commit 8e8d957ff8

View File

@ -115,6 +115,7 @@ void latencyAddSample(char *event, mstime_t latency) {
if (ts->samples[prev].time == now) {
if (latency > ts->samples[prev].latency)
ts->samples[prev].latency = latency;
if (latency > ts->max) ts->max = latency;
return;
}