Skip to content

Commit

Permalink
rename masterchan to eventchan, retryNum -= 1 when error is retryable
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-chenzz committed Feb 17, 2024
1 parent 1a5bc00 commit 5af3cd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/bizflow/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (g *Graph) execNext(it *item) {
}
}
}
func (g *Graph) masterChanClosed() bool {
func (g *Graph) eventChanClosed() bool {
select {
case _, ok := <-g.eventChan:
return !ok
Expand All @@ -129,11 +129,11 @@ func (g *Graph) masterChanClosed() bool {
}
func (g *Graph) work(it *item) {
// 先检查一下
if g.masterChanClosed() {
if g.eventChanClosed() {
return
}
defer func() {
if !g.masterChanClosed() {
if !g.eventChanClosed() {
g.eventChan <- it
}
}()
Expand Down

0 comments on commit 5af3cd5

Please sign in to comment.