-
Notifications
You must be signed in to change notification settings - Fork 258
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
ffi: cancelling media upload results in panic #3573
Comments
@stefanceriu is the calling code calling |
Can you try #4141 and let me know if it fixes the issue, please? |
Sure can, but first, it does indeed call cancel before join. But seems it was like that from the very begining even though I honestly can't remember why. Does that make any sense? |
It makes sense to me in terms of API usage; there's no good reason why you couldn't join after cancelling, it just means you're joining immediately. But the code didn't handle it at all, and thus would crash (also there's a weird entanglement of a task spawned in a task when joining, causing the cascading failure from |
Well sure yeah, but why were we doing that as soon as receiving the handle? Surely can't be a plain old bug, we tested this feature a bunch after implementing it 🤔 |
I honestly don't know. It seems the first implementation of the join/cancel pair already had this issue, unless the behavior of tokio itself changed with respect to joining-after-cancelling. |
Found on https://github.com/element-hq/element-x-ios-rageshakes/issues/1895
As easy to reproduce as cancelling an ongoing media upload i.e. handle + cancellation
The text was updated successfully, but these errors were encountered: