Skip to content

Commit

Permalink
CFS-2079 | fix: return false if context is done
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Isaev committed Sep 6, 2021
1 parent 4132891 commit b3a13d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions asyncwait.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (aw asyncWait) Wait(predicate func() bool) bool {
case <-aw.doneCh:
return true
case <-ctx.Done():
return false
case <-ticker.C:
go func() {
if predicate() {
Expand Down

0 comments on commit b3a13d6

Please sign in to comment.