Skip to content

fix: Fix a panic when calling JoinError::into_panic#461

Merged
bikeshedder merged 1 commit intodeadpool-rs:mainfrom
Hywan:fix-runtime-panic
Feb 2, 2026
Merged

fix: Fix a panic when calling JoinError::into_panic#461
bikeshedder merged 1 commit intodeadpool-rs:mainfrom
Hywan:fix-runtime-panic

Conversation

@Hywan
Copy link
Copy Markdown
Contributor

@Hywan Hywan commented Jan 30, 2026

That's a lot of panics. This patch fixes a panic raised by JoinError:into_panic when the JoinError represents a cancellation instead of a panic.


@Hywan Hywan force-pushed the fix-runtime-panic branch from 9a081a7 to eda9841 Compare January 30, 2026 12:39
That's a lot of panics. This patch fixes a panic raised by
`JoinError:into_panic` when the `JoinError` represents a cancellation
instead of a panic.
@Hywan Hywan force-pushed the fix-runtime-panic branch from eda9841 to 3086626 Compare January 30, 2026 12:39
Hywan added a commit to Hywan/matrix-rust-sdk that referenced this pull request Jan 30, 2026
This patch replaces the `interact(…).unwrap()` by a proper error.

So far, `interact()` was only returning `InteractError::Panic`
despites `InteractError::Aborted` exists. With
deadpool-rs/deadpool#461, we now get
`InteractError::Aborted` when the SDK is shutdown, sometimes. This
results in hitting the `unwrap` and having a panic again. This patch
solves the problem by changing the `unwrap` to a proper error. Note: in
case of `InteractError::Panic`, we continue to panic.

This patch makes sense with or without the merge of the PR on
`deadpool`.
Hywan added a commit to matrix-org/matrix-rust-sdk that referenced this pull request Jan 30, 2026
This patch replaces the `interact(…).unwrap()` by a proper error.

So far, `interact()` was only returning `InteractError::Panic`
despites `InteractError::Aborted` exists. With
deadpool-rs/deadpool#461, we now get
`InteractError::Aborted` when the SDK is shutdown, sometimes. This
results in hitting the `unwrap` and having a panic again. This patch
solves the problem by changing the `unwrap` to a proper error. Note: in
case of `InteractError::Panic`, we continue to panic.

This patch makes sense with or without the merge of the PR on
`deadpool`.
@bikeshedder bikeshedder merged commit 2cbdec8 into deadpool-rs:main Feb 2, 2026
10 checks passed
@Hywan
Copy link
Copy Markdown
Contributor Author

Hywan commented Feb 3, 2026

Is it possible to get a new release pleeeease ❤️?

@Hywan
Copy link
Copy Markdown
Contributor Author

Hywan commented Feb 3, 2026

@bikeshedder
Copy link
Copy Markdown
Collaborator

https://github.com/deadpool-rs/deadpool/releases/tag/deadpool-runtime-v0.3.1 apparently it's here

Almost. The runtime crate got updated but as it is a breaking change a release of the other deadpool-* crates is required, too. I'm preparing a release of the entire deadpool-* suite. I'll keep you updated when that's been done.

@Hywan
Copy link
Copy Markdown
Contributor Author

Hywan commented Feb 3, 2026

Lovely, thanks!

Hywan added a commit to Hywan/matrix-rust-sdk that referenced this pull request Feb 24, 2026
Hywan added a commit to matrix-org/matrix-rust-sdk that referenced this pull request Feb 24, 2026
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

Successfully merging this pull request may close these issues.

Panicking when dropping deadpool-runtime

2 participants