Skip to content

Commit

Permalink
main: Fix ready message order
Browse files Browse the repository at this point in the history
  • Loading branch information
ish-hcc committed May 24, 2024
1 parent 65ef480 commit bc2a1af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion agent/cmd/cm-honeybee-agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ func init() {

logger.Println(logger.INFO, false, "Agent UUID: "+common.AgentUUID)

controller.OkMessage.Message = "API server is not ready"

var wg sync.WaitGroup
wg.Add(1)
go func() {
defer func() {
wg.Done()
}()
controller.OkMessage.Message = "API server is not ready"
server.Init()
}()

Expand Down
3 changes: 2 additions & 1 deletion server/cmd/cm-honeybee/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ func init() {
log.Panicln(err)
}

controller.OkMessage.Message = "API server is not ready"

var wg sync.WaitGroup
wg.Add(1)
go func() {
defer func() {
wg.Done()
}()
controller.OkMessage.Message = "API server is not ready"
server.Init()
}()

Expand Down

0 comments on commit bc2a1af

Please sign in to comment.