1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-23 17:53:05 +02:00

don't block forever

This commit is contained in:
Asim Aslam 2020-01-17 15:23:10 +00:00
parent be788415ad
commit d7b9b2713b

View File

@ -42,6 +42,8 @@ func (t *table) sendEvent(e *Event) {
select {
case w.resChan <- e:
case <-w.done:
// don't block forever
case <-time.After(time.Second):
}
}
}