splitclient-rb 7.3.3.pre.rc15 → 7.3.3.pre.rc16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6011a8ec7587ef806322e847243042e6c34b9f3b6ca1f08e3fc9f87d05d5ac96
4
- data.tar.gz: 1b670949406f9012140d994a01b684dd1453becd851cd1f924e5d208353d0292
3
+ metadata.gz: b6a503ff0883295f9fb3f4410382626edb0ff66aceed4fb06106fb88715e0ad3
4
+ data.tar.gz: c3acbd299d79022385b9d460ddbfd5563a1e54f730f9307f86eb7c48288028af
5
5
  SHA512:
6
- metadata.gz: 6070bd7ac8e68ff7244f2d1e994486ca4adafcde9f02bc2bfdbe751e3850b9b096db32d8d28a1995d2d37e9b4c7d9851566e1c2c3c0e5cc4b091eb15b837ca04
7
- data.tar.gz: 2796872276340ca370e70947ddeb4528a5a32e0d2f3d30c0c0f1af55431c4984637c9f98e01c4b3335b5973a798e579f02063a240f1221b17f876b978580465a
6
+ metadata.gz: a0a57f93b4cea780cd29029ac1d3d3f314cff353981dcf61b9315c94ccec1c1a180fc4f0d17d741ec6376dd7a89a67a36336b21b4ed60ef4d0ab96cb5b0ef358
7
+ data.tar.gz: a0729c23bde1600a2dad108e5d059eb820c7de2d476a26595d69c00677fc336020cfebb16339caf55d5faea1c34c73dc5c8fc396546887fc7c614504c3ad23a3
@@ -18,7 +18,7 @@ module SplitIoClient
18
18
  @config.logger.debug("Auth service response push_enabled: #{response[:push_enabled]}") if @config.debug_enabled
19
19
 
20
20
  if response[:push_enabled] && @sse_handler.start(response[:token], response[:channels])
21
- schedule_next_token_refresh(response[:exp])
21
+ schedule_next_token_refresh(200)
22
22
  @back_off.reset
23
23
  record_telemetry(response[:exp])
24
24
 
@@ -35,7 +35,6 @@ module SplitIoClient
35
35
 
36
36
  def stop_sse
37
37
  @config.logger.error('## STOP SSE')
38
- @sse_handler.process_disconnect if @sse_handler.sse_client.nil?
39
38
  @sse_handler.stop
40
39
  SplitIoClient::Helpers::ThreadHelper.stop(:schedule_next_token_refresh, @config)
41
40
  end
@@ -35,7 +35,7 @@ module SplitIoClient
35
35
  @on[:action] = action
36
36
  end
37
37
 
38
- def close
38
+ def close(action = nil)
39
39
  unless connected?
40
40
  @config.logger.error('SSEClient already disconected.') if @config.debug_enabled
41
41
  return
@@ -44,6 +44,7 @@ module SplitIoClient
44
44
  @connected.make_false
45
45
  @socket&.close
46
46
  @config.logger.error('## CLOSE SSE')
47
+ dispatch_action(action) unless action.nil?
47
48
  rescue StandardError => e
48
49
  @config.logger.error("SSEClient close Error: #{e.inspect}")
49
50
  end
@@ -78,7 +79,7 @@ module SplitIoClient
78
79
  @config.logger.error('## CONNECT THREAD')
79
80
  @config.logger.info('Starting connect_stream thread ...') if @config.debug_enabled
80
81
  action = connect_stream(latch)
81
- dispatch_action(action)
82
+ dispatch_action(action) unless action.nil?
82
83
  @config.logger.info('connect_stream thread finished.') if @config.debug_enabled
83
84
  @config.logger.error('#### DISCONNECTED')
84
85
  end
@@ -96,7 +97,7 @@ module SplitIoClient
96
97
  raise 'eof exception' if partial_data == :eof
97
98
  rescue Errno::EBADF, IOError => e
98
99
  @config.logger.error(e.inspect)
99
- return Constants::PUSH_NONRETRYABLE_ERROR
100
+ return nil
100
101
  rescue StandardError => e
101
102
  @config.logger.error("Error reading partial data: #{e.inspect}") if @config.debug_enabled
102
103
  return Constants::PUSH_RETRYABLE_ERROR
@@ -104,7 +105,7 @@ module SplitIoClient
104
105
 
105
106
  process_data(partial_data)
106
107
  end
107
- Constants::PUSH_NONRETRYABLE_ERROR
108
+ nil
108
109
  end
109
110
 
110
111
  def socket_write(latch)
@@ -31,7 +31,7 @@ module SplitIoClient
31
31
  end
32
32
 
33
33
  def stop
34
- @sse_client.close
34
+ @sse_client.close(Constants::PUSH_NONRETRYABLE_ERROR)
35
35
  stop_workers
36
36
  rescue StandardError => e
37
37
  @config.logger.debug("SSEHandler stop error: #{e.inspect}") if @config.debug_enabled
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.3.3.pre.rc15'
2
+ VERSION = '7.3.3.pre.rc16'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splitclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.3.pre.rc15
4
+ version: 7.3.3.pre.rc16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Split Software