Skip to content

Commit

Permalink
Merge pull request #19 from skyhackvip/bug/1
Browse files Browse the repository at this point in the history
fix bug goroutine
  • Loading branch information
skyhackvip authored Feb 22, 2024
2 parents 5e3bab4 + a3dd329 commit 336ffbe
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 336ffbe

Please sign in to comment.