Skip to content

Commit

Permalink
[fix] Ensure fatal panics are notified
Browse files Browse the repository at this point in the history
Due to a bug in the existing `notifier.NotifySync` method, we end up
using the notifier's config value to determine whether to send
synchronously or async. In the case of a fatal panic (i.e not
`AutoNotified` or `Recover`-ed) it still got sent asynchronously.
This change ensures that it does get sent synchronously.
  • Loading branch information
kinbiko authored and kattrali committed Oct 5, 2018
1 parent a3ed669 commit e448245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panicwrap.go
Expand Up @@ -22,7 +22,7 @@ func defaultPanicHandler() {
defaultNotifier.Config.logf("bugsnag.handleUncaughtPanic: %v", err)
}
state := HandledState{SeverityReasonUnhandledPanic, SeverityError, true, ""}
Notify(toNotify, state, Configuration{Synchronous: true})
defaultNotifier.NotifySync(toNotify, true, state)
})

if err != nil {
Expand Down

0 comments on commit e448245

Please sign in to comment.