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

Fixup to e3b2201f: prevent open::that from blocking, fix a typo, minor code simplification #764

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

ilyagr
Copy link
Contributor

@ilyagr ilyagr commented Feb 29, 2024

open::that can block, for example when firefox is the default browser
on Linux and no instance of firefox is running.


Perhaps tokio::spawn_blocking with open::that would be better in terms of error handling than using that_detached. The latter does not report an error if the browser exits with an error code. OTOH, with open::that, killing the server might kill the browser...

@ilyagr ilyagr force-pushed the fixup branch 3 times, most recently from 2ac3fcb to ebb1937 Compare February 29, 2024 01:55
@ilyagr ilyagr marked this pull request as draft March 1, 2024 01:21
@ilyagr ilyagr changed the title Fixup to e3b2201f: fix a typo, minor code simplification Fixup to e3b2201f: prevent open::that from blocking, fix a typo, minor code simplification Mar 1, 2024
@ilyagr ilyagr marked this pull request as ready for review March 1, 2024 01:28
@ilyagr ilyagr force-pushed the fixup branch 5 times, most recently from 2b72de2 to e0cb9d1 Compare March 2, 2024 04:13
`open::that` can block, for example when `firefox` is the default browser
on Linux and no instance of `firefox` is running.
@attila-lin attila-lin merged commit eb1f01b into poem-web:master Mar 10, 2024
6 of 7 checks passed
@attila-lin
Copy link
Collaborator

Thanks

@ilyagr ilyagr deleted the fixup branch March 10, 2024 03:32
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.

2 participants