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

require a magic response for dev reload server to reconnect #115

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

samuelcolvin
Copy link
Member

@samuelcolvin samuelcolvin commented Dec 21, 2023

Previously, the dev reload logic would reconnect whenever it got a 200 response, which meant with a dev server than returns 200 for all routes, the dev logic was constantly reconnecting.

With this, it only reconnects if it gets a response starting with a specific string 'fastui-dev-reload',

Also connect to the endpoint defined by rootUrl.

cc @dmontagu @JonasKs.

Verified

This commit was signed with the committer’s verified signature.
samuelcolvin Samuel Colvin
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4274a8d) 87.71% compared to head (13540a9) 92.58%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
+ Coverage   87.71%   92.58%   +4.86%     
==========================================
  Files          11       11              
  Lines         700      701       +1     
==========================================
+ Hits          614      649      +35     
+ Misses         86       52      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Verified

This commit was signed with the committer’s verified signature.
samuelcolvin Samuel Colvin
@samuelcolvin samuelcolvin merged commit 429275b into main Dec 21, 2023
@samuelcolvin samuelcolvin deleted the dev-reload-magic-response branch December 21, 2023 17:45
@JonasKs
Copy link

JonasKs commented Dec 21, 2023

Awesome! Thanks 🙏

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