Skip to content

Commit

Permalink
fix poll loop close
Browse files Browse the repository at this point in the history
  • Loading branch information
fstab committed Jun 24, 2019
1 parent 5060649 commit be0a033
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tailer/fswatcher/pollingFseventProducerLoop.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ func runPollLoop(pollInterval time.Duration) *pollloop {
tick := time.After(pollInterval)
select {
case <-tick:
events <- struct{}{}
select {
case events <- struct{}{}:
case <-done:
return
}
case <-done:
return
}
Expand Down

0 comments on commit be0a033

Please sign in to comment.