Skip to content

Commit

Permalink
fix(rule): rule hang while restarting if the plugin was deleted previ…
Browse files Browse the repository at this point in the history
…ously

Signed-off-by: Jiyong Huang <[email protected]>
  • Loading branch information
ngjaying committed Nov 25, 2022
1 parent 967d4a8 commit 61c6c50
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/topo/rule/ruleState.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ func NewRuleState(rule *api.Rule) (*RuleState, error) {
Rule: rule,
ActionCh: make(chan ActionSignal),
}
rs.Run()
if tp, err := planner.Plan(rule); err != nil {
return rs, err
} else {
rs.Topology = tp
rs.Run()
return rs, nil
}
}
Expand Down Expand Up @@ -203,7 +203,6 @@ func (rs *RuleState) runTopo(ctx context.Context) {
if rs.Topology != nil {
rs.topoGraph = rs.Topology.GetTopo()
}
rs.Topology = nil
rs.Unlock()
}
}
Expand Down

0 comments on commit 61c6c50

Please sign in to comment.