-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
[POSTPONED] fix: Fix panic when sending 30 offline messages #4419
Conversation
This might not be needed after all because of tokio-rs/tokio#5710, but since I already wrote the code, I created a PR anyway.
tokio-rs/tokio#5710 didn't have any progress, so, seems like we are going to need the PR here, after all. |
tokio::time::timeout(duration, async { | ||
tools::timeout(duration, async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Simon-Laux and me assume that this was the offending line:
At
deltachat-core-rust/src/scheduler.rs
Line 668 in a249571
timeout = Some(timeout.map_or(30, |timeout: u64| timeout.saturating_mul(3))) |
we multiply the timeout by 3 every time a message can't be sent, whether . So, if the user sends 30 messages, idle_interrupt_receiver
receives an interrupt every time, the message fails to be sent every time, and the timeout is multiplied by 3 every time.
tokio-rs/tokio#5710 is merged 🎉 as soon as it's released, I'll update the PR here. |
FYI, the new tokio version has been released. :) |
I am going to replace this PR with #4490, porting the test there and then upgrading tokio to 1.29.0. |
Replaced with #4490 |
Fix #4414
This might not be needed after all because of
tokio-rs/tokio#5710, but since I already wrote the code, I created a PR anyway.