mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-21 13:03:22 +00:00
fix: call recoverer for go listeners
This commit is contained in:
parent
1a8c576e55
commit
b13062316a
@ -41,6 +41,12 @@ func (b *Bait) Emit(event string, args ...interface{}) {
|
||||
|
||||
if handles != nil {
|
||||
for _, handle := range handles {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
b.callRecoverer(event, handle, err)
|
||||
}
|
||||
}()
|
||||
|
||||
handle(args...)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user