Codebase list golang-github-go-kit-kit / a7fe87b
fix bug #799 (#848) * fix bug #799 I have a test. Just close etcd, after 10 seconds, it will dead loop crazy, cpu100%. Need add a little guard code. * Update client.go zii authored 5 years ago Peter Bourgon committed 5 years ago
1 changed file(s) with 5 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
208208 go func() {
209209 for {
210210 select {
211 case <-c.hbch:
211 case r := <-c.hbch:
212 // avoid dead loop when channel was closed
213 if r == nil {
214 return
215 }
212216 case <-c.ctx.Done():
213217 return
214218 }