diff --git a/client/remote.go b/client/remote.go index 8472e9ce..dbb3447e 100644 --- a/client/remote.go +++ b/client/remote.go @@ -332,18 +332,18 @@ type ewmaLatency struct { measured bool } -func (l ewmaLatency) Update(val time.Duration) { +func (l *ewmaLatency) Update(val time.Duration) { l.measured = true l.val /= 2 l.val += (val / 2) } -func (l ewmaLatency) Reset() { +func (l *ewmaLatency) Reset() { l.val = 0 l.measured = false } -func (l ewmaLatency) Better(r ewmaLatency) bool { +func (l *ewmaLatency) Better(r ewmaLatency) bool { // if l is not measured (it also means last measurement was // a failure), any updated/measured latency is better than // l. Also if neither l or r is measured, l can't be better