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

sentry: fix unhandled exception in peer handshake close #1897

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

canepat
Copy link
Member

@canepat canepat commented Mar 8, 2024

See #1896

@canepat canepat added the maintenance Some maintenance work (fix, refactor, rename, test...) label Mar 8, 2024
@canepat canepat requested a review from battlmonstr March 8, 2024 22:02
this->handshake_promise_.set_value(false);
try {
this->handshake_promise_.set_value(false);
} catch (const std::exception& e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what kind of exception is thrown and why?
is it possible to avoid a "catch all" and "ignore" here?

Copy link
Member Author

@canepat canepat Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a std::runtime_error we raise in AwaitableFuture::set when AsyncChannel::try_send returns false (i.e. not sent) and the channel is still open. We definitely can investigate this issue more and probably have a better fix, but I propose to do this in next PR on the subject.

Maybe we can keep #1896 open and you can put it on your todo list, if you agree.

@battlmonstr battlmonstr merged commit fe9c835 into master Mar 11, 2024
4 checks passed
@battlmonstr battlmonstr deleted the sentry_fix_peer_handshake_close branch March 11, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Some maintenance work (fix, refactor, rename, test...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants