Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
Fix codebase reload. (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
cybwan authored and reaver-flomesh committed Dec 12, 2022
1 parent 8e14402 commit 37b5c9b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/sidecar/providers/pipy/repo/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,19 @@ func (s *Server) fireExistProxies() []*pipy.Proxy {
if err != nil {
continue
}
s.fireUpdatedPod(s.proxyRegistry, proxy)
proxy = s.fireUpdatedPod(s.proxyRegistry, proxy)
allProxies = append(allProxies, proxy)
}
return allProxies
}

func (s *Server) fireUpdatedPod(proxyRegistry *registry.ProxyRegistry, proxy *pipy.Proxy) {
if v := proxyRegistry.GetConnectedProxy(proxy.UUID.String()); v == nil {
func (s *Server) fireUpdatedPod(proxyRegistry *registry.ProxyRegistry, proxy *pipy.Proxy) *pipy.Proxy {
connectedProxy := proxyRegistry.GetConnectedProxy(proxy.UUID.String())
if connectedProxy == nil {
s.informProxy(proxy)
return proxy
}
return connectedProxy
}

func (s *Server) informProxy(proxy *pipy.Proxy) {
Expand Down

0 comments on commit 37b5c9b

Please sign in to comment.