Skip to content

Commit

Permalink
APIGOV-28913 - fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekschauhan committed Sep 30, 2024
1 parent 10008e6 commit ade6cf1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/agent/poller/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ func (p *PollClient) Start() error {
if p.onStreamConnection != nil {
p.onStreamConnection()
}

p.mutex.Lock()
p.initialized = true
p.mutex.Unlock()

select {
case err := <-listenCh:
Expand Down

0 comments on commit ade6cf1

Please sign in to comment.