Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pub/Sub Subscription's receive method can panic #56

Open
SolarLiner opened this issue Jul 19, 2021 · 0 comments
Open

Pub/Sub Subscription's receive method can panic #56

SolarLiner opened this issue Jul 19, 2021 · 0 comments

Comments

@SolarLiner
Copy link

SolarLiner commented Jul 19, 2021

Right now, using receive and receive_with_options panics on any error (for example, loss of network or socket unexpectedly closed), preventing graceful handling of them. Furthermore, it is impossible to use catch_unwind as the Subscription type is not unwind-safe.

It would make more sense to return a Result and let the library user deal with the handling (or revert to old behavior via .unwrap()/.except()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant