File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
lib/splitclient-rb/clients Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,11 @@ def destroy
9999 if !@config . cache_adapter . is_a? ( SplitIoClient ::Cache ::Adapters ::RedisAdapter ) && @config . impressions_mode != :none &&
100100 ( !@impressions_repository . empty? || !@events_repository . empty? )
101101 @config . logger . debug ( "Impressions and/or Events cache is not empty" )
102+ # Adding small delay to ensure sender threads are fully running
103+ sleep ( 0.1 )
102104 if !@config . threads . key? ( :impressions_sender ) || !@config . threads . key? ( :events_sender )
103105 @config . logger . debug ( "Periodic data recording thread has not started yet, waiting for service startup." )
104- @config . threads [ :start_sdk ] . join
106+ @config . threads [ :start_sdk ] . join if @config . threads . key? ( :start_sdk )
105107 end
106108 end
107109 @config . threads . select { |name , thread | name . to_s . end_with? 'sender' } . values . each do |thread |
Original file line number Diff line number Diff line change 7272
7373 factory5 = SplitIoClient ::SplitFactory . new ( 'test_api_key' ,
7474 features_refresh_rate : 9999 ,
75- telemetry_refresh_rate : 99999 ,
76- impressions_refresh_rate : 99999 ,
7775 streaming_enabled : false )
7876 client5 = factory5 . client
7977 client5 . block_until_ready
You can’t perform that action at this time.
0 commit comments