From fc2ebe1c1205d3704cfed6cceab91ba56973834f Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Tue, 16 Aug 2022 09:41:08 -0700 Subject: [PATCH] client: fix race in heartbeat tracker (#14119) --- client/heartbeatstop.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/heartbeatstop.go b/client/heartbeatstop.go index a3e57b10e..b75dea9c1 100644 --- a/client/heartbeatstop.go +++ b/client/heartbeatstop.go @@ -70,7 +70,7 @@ func (h *heartbeatStop) shouldStopAfter(now time.Time, interval time.Duration) b func (h *heartbeatStop) watch() { // If we never manage to successfully contact the server, we want to stop our allocs // after duration + start time - h.lastOk = time.Now() + h.setLastOk(time.Now()) stop := make(chan string, 1) var now time.Time var interval time.Duration