Skip to content

Commit

Permalink
Merge pull request #56 from aserto-dev/fix_bundle_check
Browse files Browse the repository at this point in the history
Only check bundle status if runtime is started
  • Loading branch information
carabasdaniel authored Aug 6, 2024
2 parents 6b2a98f + 32c6fe7 commit 91a627e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (r *Runtime) pluginsLoaded() bool {
continue
}

if pluginName == bundlePluginName || status.State == plugins.StateNotReady {
if (pluginName == bundlePluginName || status.State == plugins.StateNotReady) && r.Started {
bundles, err := r.GetBundles(timeoutCxt)
if err == nil && len(bundles) > 0 {
// if bundle plugin state is not ready after a reconfiguration, forcefully update plugin state if bundles are loaded.
Expand Down
2 changes: 1 addition & 1 deletion runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ func (r *Runtime) Start(ctx context.Context) error {
// Stop - triggers plugin manager to stop all plugins.
func (r *Runtime) Stop(ctx context.Context) {
if r.Started {
r.pluginsManager.Stop(ctx)
r.Started = false
r.pluginsManager.Stop(ctx)
}
}

Expand Down

0 comments on commit 91a627e

Please sign in to comment.