-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Enhance Blazor.reconnect to state whether failures are due to circuit not existing so we can auto-reload page #44669
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
Comments
I was wondering. We can not store sessions, e.g. for a week? If the client frequently visits the website, why drop him or her? Each entry extends life by 7 days. I understand that for websites with a lot of hits, it can draw a lot of resources, although it seems to me that up to 100k unique users per month it will not be a big problem. I haven't looked in source, what data is stored? They shouldn't weigh much. |
Thanks for contacting us. We're moving this issue to the |
The team discussed this and we agree with the suggestion. That is, when calling Otherwise the developer can't differentiate between this scenario and something like the internet connection is temporarily down so it's worth retrying the reconnection later. |
Any possibility this could be available in a minor version instead of waiting for next major version ? |
@Alerinos,
See this example that shows how to define custom reconnection behavior. It can be tweaked to handle the two error cases differently. I'm going to close this as "answered", but please feel free to reopen if you disagree that the existing functionality addresses this issue. Thanks! |
@MackinnonBuck |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I created a connection support. If it is broken, a message pops up and then every 30 seconds the system tries to establish a connection.
Everything works fine until the server loses sessions.
This causes an error that requires the entire page to be reloaded.
I need a function in javascript to check the state if there is a connection to blazor, if it has been broken, if there is any error.
An event like
onError:
Example:
Describe the solution you'd like
Currently, the only option is to manually click or call the meta tag refres, it is not a professional solution.
By the way, why are broken connections by the server not handled? This can be done without reloading the page ...
Also, better handling of the call, more automatic than manual, would be useful. People who see the default messages are scared and leave the site, which results in a drop in impressions.
Additional context
No response
The text was updated successfully, but these errors were encountered: