You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using LaunchDarkly relay proxy in daemon mode (use_ldd=True) causes the following error whenever the client is closed.
'LDClient' object has no attribute '_update_processor': AttributeError
Traceback (most recent call last):
...
client.close()
File "/var/task/ldclient/client.py", line 160, in close
if self._update_processor and self._update_processor.is_alive():
AttributeError: 'LDClient' object has no attribute '_update_processor'
Note that this can also be triggered by calling ldclient.set_config(config).
The issue is that because we are running in daemon mode, the _update_processor attribute for the client was never set. The following lines from ldclient.client.LDClient#__init__ capture this.
ifself._config.use_ldd:
log.info("Started LaunchDarkly Client in LDD mode")
return
but the _update_processor attribute is not set until later in the object initialization.
To reproduce
Create a client with a config that has use_ldd set to True and try to call close on that client.
Expected behavior
The client should close the connection without an issue.
Logs
'LDClient' object has no attribute '_update_processor': AttributeError
Traceback (most recent call last):
...
ldclient.set_config(config)
File "/var/task/ldclient/__init__.py", line 47, in set_config
old_client.close()
File "/var/task/ldclient/client.py", line 160, in close
if self._update_processor and self._update_processor.is_alive():
AttributeError: 'LDClient' object has no attribute '_update_processor'
SDK version
6.8.4
Language version, developer tools
Python 3.6
Additional context
I discovered this while using the SDK in a lambda function. Even though it was a new call to the lambda, calling ldclient.set_config caused the client from the previous run to try to close, which caused this issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
Using LaunchDarkly relay proxy in daemon mode (
use_ldd=True
) causes the following error whenever the client is closed.Note that this can also be triggered by calling
ldclient.set_config(config)
.The issue is that because we are running in daemon mode, the
_update_processor
attribute for the client was never set. The following lines fromldclient.client.LDClient#__init__
capture this.but the
_update_processor
attribute is not set until later in the object initialization.To reproduce
Create a client with a config that has
use_ldd
set toTrue
and try to callclose
on that client.Expected behavior
The client should close the connection without an issue.
Logs
SDK version
6.8.4
Language version, developer tools
Python 3.6
Additional context
I discovered this while using the SDK in a lambda function. Even though it was a new call to the lambda, calling
ldclient.set_config
caused the client from the previous run to try to close, which caused this issue.The text was updated successfully, but these errors were encountered: