From 60355bf74a63a285a6d84ef8c507aaddafcecbbb Mon Sep 17 00:00:00 2001 From: Benson Wong Date: Tue, 11 Mar 2025 11:00:45 -0700 Subject: [PATCH] fix some potentially confusing Process.start() comment --- proxy/process.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proxy/process.go b/proxy/process.go index db0bc91..db3bb5d 100644 --- a/proxy/process.go +++ b/proxy/process.go @@ -116,7 +116,9 @@ func (p *Process) start() error { return fmt.Errorf("can not start(), upstream proxy missing") } - // wait for the other start() to complete + // multiple start() calls will wait for the one that is actually starting to + // complete before proceeding. + // =========== curState := p.CurrentState() if curState == StateReady { @@ -132,6 +134,7 @@ func (p *Process) start() error { return nil } + // =========== // There is the possibility of a hard to replicate race condition where // curState *WAS* StateStopped but by the time we get to the p.stateMutex.Lock()