-
Notifications
You must be signed in to change notification settings - Fork 34
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
Unleash created infinite loop when proxy server is down #92
Comments
Looking into this. Are you by chance using |
Yes. That's was part of the bug. |
I think the problem is that the core library is emitting an event when the call fails, and we are listening on that event in this SDK. When we call updateContext that immediately triggers a new fetch, which fails, emits and events and the cycle continues. Let me verify that this is what is happening before I publish a fix. |
I think so. How can I verify this? It looks & sounds like our issue :) |
I've merged a fix. Could you try version: |
Sure I will try tomorrow if that's ok |
Of course. Thanks! |
@FredrikOseberg Looks great! Indeed solved the issue. |
Describe the bug
Unleash FlagProvider accepts: startClient, config.
We are passing "startClient={false}" until we have the proxy server setted up.
The problem is that even when passing "startClient" false Unleash still tries to access the server and infinity (caused infinite loop in our app & to crush)
Steps to reproduce the bug
Wrap your app with the following:
Reproduction
Expected behavior
Allow passing "maxRetries" in the config. Or at least add in your code "retryInterval" option
Logs, error output, etc.
No response
Screenshots
Additional context
No response
Unleash version
No response
Subscription type
Enterprise
Hosting type
Hosted by Unleash
SDK information (language and version)
(Typescript) "@unleash/proxy-client-react": "^3.4.0", "unleash-proxy-client": "^2.3.0",
The text was updated successfully, but these errors were encountered: