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 app breaking on cold boot redirects #220

Merged
merged 2 commits into from
Apr 1, 2022

Conversation

ghiculescu
Copy link
Contributor

@ghiculescu ghiculescu commented Mar 8, 2022

Fixes #217

The 500ms delay logic in shouldOverrideUrlLoading / shouldProposeThrottledVisit is fine for link clicks, but doesn't make sense when following multiple redirects. So this PR just skips that logic while in a cold boot redirect.

See #217 for more detail on example scenarios and how to replicate. There's another branch (here) that you can use to replicate, but I figured I'd keep the fix PR small and if you'd like the extra examples added to the demo I can make followup PRs for that.

@jayohms
Copy link
Collaborator

jayohms commented Apr 1, 2022

Thank you @ghiculescu! Great work uncovering this subtle bug — and your solution makes sense. Merging now.

@jayohms jayohms merged commit 8e753ef into hotwired:main Apr 1, 2022
@ghiculescu ghiculescu deleted the slow-redirect-fixx branch April 1, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

App stops responding if a page redirects more than once on a cold boot
2 participants