diff options
| author | Will Hawkins <[email protected]> | 2023-04-25 22:55:58 -0400 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2023-04-25 23:00:20 -0400 |
| commit | a0e0b1861d5b2d0d77e728042c915f5b7742e744 (patch) | |
| tree | 92183a973f532737c13ea9913ebf78e972037e01 /lgc/upload.go | |
| parent | c9a33075c873c4ef8bb3c695cce721172c31d361 (diff) | |
[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
Diffstat (limited to 'lgc/upload.go')
| -rw-r--r-- | lgc/upload.go | 2 |
1 files changed, 1 insertions, 1 deletions
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() |
