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

Remote media: avoid never-ending loops if it won't work #353

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

rakoo
Copy link
Contributor

@rakoo rakoo commented Dec 10, 2023

I've sent a PDF as an attachment to a Status, and phanpy tries to load it, but inside an tag because that's the "default type". That fails.

In case of error, the code tries to change the url but it turns out to be exactly the same, so it tries again, and fails, and tries again, ad vitam eternam as fast as possible. This burns my CPU and even makes some calls to the same origin fail; the only recourse is to fresh-reload the app.

Non-image types don't seem to have this issue because there's no "retry with another url"

This little change makes sure we don't retry if it failed

src/components/media.jsx Outdated Show resolved Hide resolved
@cheeaun cheeaun added the bug Something isn't working label Dec 11, 2023
@cheeaun cheeaun merged commit a9c624d into cheeaun:main Dec 11, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants