mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
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:
parent
050bd28511
commit
8c3f60641e
1 changed files with 1 additions and 3 deletions
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue