Skip to content

Commit

Permalink
Added check for hook
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Shanley <[email protected]>
  • Loading branch information
daveshanley committed Jul 30, 2023
1 parent f21919b commit a38cad6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plank/pkg/server/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ func (ps *platformServer) initialize() {

// REST bridge setup done. now wait for service to be ready
if val, found := svcReadyStore.Get(request.ServiceChannel); !found || !val.(bool) {
readyChan := hooks.OnServiceReady()
svcReadyStore.Put(request.ServiceChannel, <-readyChan, service.ServiceInitStateChange)
if hooks != nil {
readyChan := hooks.OnServiceReady()
svcReadyStore.Put(request.ServiceChannel, <-readyChan, service.ServiceInitStateChange)
close(readyChan)
}
utils.Log.Infof("[ranch] Service '%s' initialized successfully", reflect.TypeOf(fabricSvc).String())
close(readyChan)
}

}, func(err error) {
Expand Down

0 comments on commit a38cad6

Please sign in to comment.