Hello 👋🏽
Describe the bug
I specify a timeout for the client and then I keep getting this error
warn: [LaunchDarkly] Received I/O error (Read timeout, received no data in 300000ms, assuming connection is dead) for streaming request - will retry
[api] info: [LaunchDarkly] Will retry stream connection in 1000 milliseconds
[workers] warn: [LaunchDarkly] Received I/O error (Read timeout, received no data in 300000ms, assuming connection is dead) for streaming request - will retry
[workers] info: [LaunchDarkly] Will retry stream connection in 1000 milliseconds
[api] TypeError: The "listener" argument must be of type function. Received an instance of Object
To reproduce
I'm creating a client once in my app like this:
export const ldClient = LaunchDarkly.init(`${LAUNCH_DARKLY_API_KEY}`, {
offline: NODE_ENV === Env.TEST, // to avoid calling LD while performing tests
timeout: 24 * 60 * 60, // 1 day
})
Yet I still face the error mentioned above, is there any good practice to keep a larger timeout? as it makes us restart our API in local dev.
Expected behavior
To keep a longer timeout at least for our local dev environment.
SDK version
^6.2.2
Language version, developer tools
Typescript: ^4.3.5
OS/platform
MacOS 12.2.1 (Monterey)
** Node Version **
Node 16.4.0 (LTS)