From b8a405434625ba1787d39ce1cf10868fd39f0a51 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Thu, 14 May 2026 17:38:51 -0700 Subject: [PATCH] fix: ineffective assignment to non-pointer ewmaLatency --- client/remote.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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