2
2
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:
TorchedSammy 2022-08-01 15:13:23 -04:00
parent 1a8c576e55
commit b13062316a
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

View File

@ -41,6 +41,12 @@ func (b *Bait) Emit(event string, args ...interface{}) {
if handles != nil { if handles != nil {
for _, handle := range handles { for _, handle := range handles {
defer func() {
if err := recover(); err != nil {
b.callRecoverer(event, handle, err)
}
}()
handle(args...) handle(args...)
} }
} }