Skip to content

Commit

Permalink
Only check bundle status if runtime is started
Browse files Browse the repository at this point in the history
  • Loading branch information
carabasdaniel committed Aug 5, 2024
1 parent 6b2a98f commit 32c6fe7
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 32c6fe7

Please sign in to comment.