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

Fix stream recreation logic, prefer Interval::tick to time::sleep in tokio loops #362

Conversation

joaoantoniocardoso
Copy link
Collaborator

No description provided.

Comment on lines -172 to -174
if let Some(reason) = finish.recv().await {
return Err(anyhow!("{reason:?}"));
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If not clear, the wrong logic was here. We were only going to the if below (which triggers the stream recreation process) after this future ends, which would only be Some(reason), which would return, or None (closed), which would not necessarily happen.

@patrickelectric patrickelectric merged commit 2b1dc02 into mavlink:master Mar 15, 2024
4 checks passed
@joaoantoniocardoso joaoantoniocardoso deleted the prefer_interval_over_sleep_for_periodic_loops branch March 15, 2024 14:16
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.

None yet

2 participants