kinbiko / bugsnag

Well-documented, maintainable, idiomatic, opinionated, and *unofficial* rewrite of the Bugsnag Go notifier
MIT License
3 stars 0 forks source link

[BUG] Close is not reliable #33

Closed kinbiko closed 3 years ago

kinbiko commented 3 years ago

What exactly did you do?

Had to do this time.Sleep to ensure that sessions get tracked (sending errors seems OK, sessions consistently missing).

What did you expect would happen?

I'd see sessions get tracked in the dashboard even for immediate-return CLI apps.

What actually happened?

Silently dropped the sessions.

Additional info

It's probably related to how we're flushing -- in particular how Close returns as soon as we've requested the shutdown (channel has been read), and not when the shutdown has completed.