Skip to content
Permalink
Browse files

fix for "should use a simple channel send/receive instead of select w…

…ith a single case"
  • Loading branch information
narqo committed Feb 21, 2020
1 parent 6cd8a31 commit db0bda616f17c4ce950552e92e6dbae6348d3ecc
Showing with 2 additions and 4 deletions.
  1. +2 −4 agent/agent.go
@@ -193,10 +193,8 @@ func (a *Agent) collectAndSend(ctx context.Context) {

ctx, cancel := context.WithCancel(ctx)
go func() {
select {
case <-a.stop:
cancel()
}
<-a.stop
cancel()
}()

var (

0 comments on commit db0bda6

Please sign in to comment.
You can’t perform that action at this time.