From a0e0b1861d5b2d0d77e728042c915f5b7742e744 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Tue, 25 Apr 2023 22:55:58 -0400 Subject: [Bugfix] Tighten up check for probe connection reuse Even with previous fixes it was *still* possible for a self-down probe to have started before the underlying load-generating connection came online (or so it seems!). This patch will move changing the status of an underlying lgc from not-running state to running state even later to eliminate even the smallest possible gap. Re: #47 --- lgc/upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lgc/upload.go') diff --git a/lgc/upload.go b/lgc/upload.go index f0c772e..5175fe0 100644 --- a/lgc/upload.go +++ b/lgc/upload.go @@ -100,7 +100,7 @@ func (s *syntheticCountingReader) Read(p []byte) (n int, err error) { if s.ctx.Err() != nil { return 0, io.EOF } - if n == 0 { + if *s.n == 0 { s.lgu.statusLock.Lock() s.lgu.status = LGC_STATUS_RUNNING s.lgu.statusWaiter.Broadcast() -- cgit v1.2.3