-
Notifications
You must be signed in to change notification settings - Fork 356
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 bug where block_on
was called from an async context
#7425
Fix bug where block_on
was called from an async context
#7425
Conversation
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.
Great work finding and fixing this! log_tunnel_data_usage
is called on line 493 too, for the android version of the function. You should probably make the same change there also
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
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.
NVM, I didn't realize that the bug only affects Linux
Reviewable status: complete! all files reviewed, all discussions resolved
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.
You are right though, we should assume that the log_tunnel_data_usage
performs blocking IO imho. Atleast it is not async
anymore 😊
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @Serock3)
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.
This PR literally changed my life.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
a2c5b58
to
beee5dc
Compare
This PR fixes a regression introduced in the 2025.1 release. The fix is simple enough, simply call
log_tunnel_data_usage
from a thread where blocking is acceptable.This change is