launchdarkly / ruby-server-sdk

LaunchDarkly Server-side SDK for Ruby
https://docs.launchdarkly.com/sdk/server-side/ruby
Other
34 stars 52 forks source link

Unable to close client when using ldd #234

Closed aaricpittman closed 10 months ago

aaricpittman commented 10 months ago

Description

If you configure the client to use_ldd then you are unable to close the client. Calling client.close results in a NoMethodError for @data_source as it does not get defined when using ldd.

undefined method `stop' for nil:NilClass (NoMethodError)

It may be that closing the client is not necessary when using ldd, but I did not see anything in the docs that indicated that.

Example

config = LaunchDarkly::Config.new(
  feature_store:  LaunchDarkly::Integrations::Redis.new_feature_store(...),
  use_ldd: true
)
client = LaunchDarkly::Client.new(sdk_key, config)
client.close

Expected behavior An exception is not thrown when calling client.close.

SDK version 7.2.0

keelerm84 commented 10 months ago

Thank you for bringing this to our attention. I will look into this as soon as I am able. Once a fix has been released, I will report back here.

Tracking internally as sc-227874.

Thank you again.

keelerm84 commented 10 months ago

This has been fixed in v7.3.2.

aaricpittman commented 10 months ago

@keelerm84 Thanks 🙏.