Skip to content

Commit

Permalink
fix: proxy start endeless loop
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidapaulopt committed Jan 25, 2025
1 parent c87537a commit 95de7f5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/proxymanager/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,12 @@ func (proxy *Proxy) Start() {
go func() {
go proxy.start()
for {
event := <-proxy.providerProxy.WatchEvents()
proxy.state.Store(int32(event.State))

// TODO
select {
case event := <-proxy.providerProxy.WatchEvents():
proxy.state.Store(int32(event.State))
case <-proxy.ctx.Done():
return
}
}
}()
}
Expand Down

0 comments on commit 95de7f5

Please sign in to comment.