Describe the bug
Using js-client-sdk, network requests to fetch flags are not retried unless the client successfully retrieves flags from localStorage.
To reproduce
The client retries to fetch flags when it succeeds to bootstrap from localStorage:
- Set
bootstrap: "localStorage"
- Load the application to let the client to store flags in localStorage
- Configure to block requests to
https://*.launchdarkly.com/*
using request blocking of Chrome's request blocking
- Reload the application
- See that the requests to
https://clientstream.launchdarkly.com/eval/*
is repeated
Otherwise it does not retries the requests:
- Clear localStorage or unset
bootstrap
option
- Configure to block requests to
https://*.launchdarkly.com/*
using request blocking of Chrome's request blocking
- Reload the application
- See that the requests is not retried
Expected behavior
A client retries network requests even if bootstrap
is not set or there is no flags in localStorage.
SDK version
js-sdk-common: 3.8.2
js-client-sdk: 2.24.2
Language version, developer tools
Chrome 106
OS/platform
macOS 12.4
Additional context
These lines of code seems to be related.