Remove unnecessary and empty if block.

The if block itself is empty. Calling recover is enough to recover from panic
This commit is contained in:
Hasibul Hasan Anik 2020-03-05 13:01:17 +06:00
commit 8c3f60641e

View file

@ -65,9 +65,7 @@ func (p *EventPool) Listen() <-chan Event {
go func() {
for i := len(p.events) - 1; i >= 0; i-- {
defer func() {
if recover() != nil {
}
recover()
}()
l <- p.events[i]
}