Skip to content

Commit

Permalink
agent: patch
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskaliX committed Dec 2, 2023
1 parent 1493752 commit a16fe4d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions agent/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ func Startup(ctx context.Context, wg *sync.WaitGroup) {
if cfg.Name == agent.Product {
continue
}
err := PluginManager.Load(ctx, *cfg)
if err == ErrAlreadyLoad {
zap.S().Infof("plugin %s has loaded already", cfg.Name)
} else {
zap.S().Errorf("plugin %s load failed: %s", cfg.Name, err.Error())
if err := PluginManager.Load(ctx, *cfg); err != nil {
if err == ErrAlreadyLoad {
zap.S().Infof("plugin %s has loaded already", cfg.Name)
} else {
zap.S().Errorf("plugin %s load failed: %s", cfg.Name, err.Error())
}
}
}
// 移除插件
Expand Down

0 comments on commit a16fe4d

Please sign in to comment.