2nd call to set_config reopens the client without reopening the streaming connection #218
Labels
Stale
waiting for feedback
Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness.
Describe the bug
In our code, we accidentally called a code segment twice when our web service initiates, which effectively calls
set_config()
twice.What happens is that
set_config()
notices that a client already exists, so it prints "reinitializing", then closes the client and opens another. However, no updates to any LD flags make it to the client, it seems like there is no longer a streaming connection.Our fix was to not run the segment above 2x, and then any updates from the LD UI make it to the server as expected.
I am aware that one should not call
set_config
twice, but when you do so (accidentally) its behavior is at best confusing as a client exists and works but gets no live updates anymore.To reproduce
Call
set_config()
twice, followed by the singleton.get()
; make a change to a flag in the LD UI and validate that the client is not aware of it.Expected behavior
set_config()
closes an existing client and opens another. I would expect the new client to reopen/maintain the streaming updates to the LD server.SDK version
7.6.1
Language version, developer tools
python 3.9
OS/platform
Linux
The text was updated successfully, but these errors were encountered: