Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Aug 12, 2024
1 parent 67e2d64 commit 064e8f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/mcs/resourcemanager/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ func (s *Server) startServer() (err error) {

serverReadyChan := make(chan struct{})
defer close(serverReadyChan)
s.startServerLoop()
s.serverLoopWg.Add(1)
go utils.StartGRPCAndHTTPServers(s, serverReadyChan, s.GetListener())
<-serverReadyChan
Expand All @@ -334,6 +333,9 @@ func (s *Server) startServer() (err error) {
for _, cb := range s.GetStartCallbacks() {
cb()
}
// The start callback function will initialize storage, which will be used in service ready callback.
// We should make sure the calling sequence is right.
s.startServerLoop()

atomic.StoreInt64(&s.isRunning, 1)
return nil
Expand Down

0 comments on commit 064e8f7

Please sign in to comment.