From 25336164b249547185b97efd2d71f861f47b908d Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Wed, 28 Jun 2023 10:34:16 -0300 Subject: [PATCH] killing resfresh token thread --- lib/splitclient-rb/engine/push_manager.rb | 1 + lib/splitclient-rb/split_config.rb | 2 +- lib/splitclient-rb/sse/event_source/client.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/splitclient-rb/engine/push_manager.rb b/lib/splitclient-rb/engine/push_manager.rb index 9eba5e85..e36a9588 100644 --- a/lib/splitclient-rb/engine/push_manager.rb +++ b/lib/splitclient-rb/engine/push_manager.rb @@ -33,6 +33,7 @@ def start_sse def stop_sse @sse_handler.stop + SplitIoClient::Helpers::ThreadHelper.stop(:schedule_next_token_refresh, @config) rescue StandardError => e @config.logger.error(e.inspect) end diff --git a/lib/splitclient-rb/split_config.rb b/lib/splitclient-rb/split_config.rb index 1f42a3f8..ba42db6f 100644 --- a/lib/splitclient-rb/split_config.rb +++ b/lib/splitclient-rb/split_config.rb @@ -320,7 +320,7 @@ def init_impressions_mode(impressions_mode, adapter) return :debug else default = adapter == :redis ? :debug : :optimized - @logger.error("You passed an invalid impressions_mode, impressions_mode should be one of the following values: :debug, :optimized or :none. Defaulting to #{default} mode") + @logger.error("You passed an invalid impressions_mode, impressions_mode should be one of the following values: :debug, :optimized or :none. Defaulting to #{default} mode") unless impressions_mode.nil? return default end end diff --git a/lib/splitclient-rb/sse/event_source/client.rb b/lib/splitclient-rb/sse/event_source/client.rb index 5c44c576..022894d6 100644 --- a/lib/splitclient-rb/sse/event_source/client.rb +++ b/lib/splitclient-rb/sse/event_source/client.rb @@ -92,7 +92,7 @@ def connect_stream(latch) raise 'eof exception' if partial_data == :eof rescue Errno::EBADF, IOError => e - @config.logger.error(e.inspect) + @config.logger.error(e.inspect) if @config.debug_enabled return nil rescue StandardError => e return nil if ENV['SPLITCLIENT_ENV'] == 'test'