Skip to content

Commit

Permalink
fix bug goroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
skyhackvip committed Feb 22, 2024
1 parent 5e3bab4 commit a3dd329
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions core/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,11 @@ func (flow *DecisionFlow) GetStartNode() (*FlowNode, bool) {

func (flow *DecisionFlow) Run(ctx *PipelineContext) (err error) {
//recover
go func() {
defer func() {
if err := recover(); err != nil {
err = err
log.Error(err)
}
}()
defer func() {
if r := recover(); r != nil {
err = fmt.Errorf("recovered from panic: %v", r)
log.Error(err)
}
}()

//find StartNode
Expand Down

0 comments on commit a3dd329

Please sign in to comment.