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

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: 791cffe64de83620476b94bf8c3845d20ff60c2f3d005ef8936a592c286be927
4
- data.tar.gz: 1135f45f3fbc2105265ab9e0ba9ffaf80c447e1a941d6481813b1afa20c3063f
3
+ metadata.gz: 6011a8ec7587ef806322e847243042e6c34b9f3b6ca1f08e3fc9f87d05d5ac96
4
+ data.tar.gz: 1b670949406f9012140d994a01b684dd1453becd851cd1f924e5d208353d0292
5
5
  SHA512:
6
- metadata.gz: a8622cd332b006082f590d8b2459fda960db60b9561f15e192c0e54a5a6a6e29ff7b86d5eb58a001489b3619adad50f4fd1f9953f39d8d7c21f20c98c8a9767f
7
- data.tar.gz: 77be0c2cf8ae4c27d246581b8bebaaba579df69c536cb19be3c15918b59bcde1426a89a186ea64233cc4cd1485e47f605a744aac1955146380669338501c48be
6
+ metadata.gz: 6070bd7ac8e68ff7244f2d1e994486ca4adafcde9f02bc2bfdbe751e3850b9b096db32d8d28a1995d2d37e9b4c7d9851566e1c2c3c0e5cc4b091eb15b837ca04
7
+ data.tar.gz: 2796872276340ca370e70947ddeb4528a5a32e0d2f3d30c0c0f1af55431c4984637c9f98e01c4b3335b5973a798e579f02063a240f1221b17f876b978580465a
@@ -37,10 +37,6 @@ module SplitIoClient
37
37
  @config.logger.error('## STOP SSE')
38
38
  @sse_handler.process_disconnect if @sse_handler.sse_client.nil?
39
39
  @sse_handler.stop
40
- stop_next_token_refresh
41
- end
42
-
43
- def stop_next_token_refresh
44
40
  SplitIoClient::Helpers::ThreadHelper.stop(:schedule_next_token_refresh, @config)
45
41
  end
46
42
 
@@ -118,8 +118,8 @@ module SplitIoClient
118
118
 
119
119
  @sse_connected.make_true
120
120
  @synchronizer.stop_periodic_fetch
121
- @sse_handler.start_workers
122
121
  @synchronizer.sync_all
122
+ @sse_handler.start_workers
123
123
  record_telemetry(Telemetry::Domain::Constants::SYNC_MODE, SYNC_MODE_STREAMING)
124
124
  rescue StandardError => e
125
125
  @config.logger.error("process_connected error: #{e.inspect}")
@@ -132,8 +132,8 @@ module SplitIoClient
132
132
  end
133
133
 
134
134
  @sse_connected.make_false
135
- @synchronizer.start_periodic_fetch
136
135
  @sse_handler.stop_workers
136
+ @synchronizer.start_periodic_fetch
137
137
  record_telemetry(Telemetry::Domain::Constants::SYNC_MODE, SYNC_MODE_POLLING)
138
138
 
139
139
  if reconnect
@@ -7,10 +7,12 @@ module SplitIoClient
7
7
  thread = config.threads[thread_sym]
8
8
 
9
9
  unless thread.nil?
10
- Thread.kill thread
11
- config.logger.debug("#{thread_sym} killed.") if config.debug_enabled
10
+ config.logger.debug("Stopping #{thread_sym} thread...") if config.debug_enabled
11
+ # sleep(0.1) while thread.status == 'run'
12
+ Thread.kill(thread)
12
13
  end
13
14
  rescue StandardError => e
15
+ puts e.inspect
14
16
  config.logger.error(e.inspect)
15
17
  end
16
18
 
@@ -77,8 +77,8 @@ module SplitIoClient
77
77
  @config.threads[:connect_stream] = Thread.new do
78
78
  @config.logger.error('## CONNECT THREAD')
79
79
  @config.logger.info('Starting connect_stream thread ...') if @config.debug_enabled
80
- closed_with_exception = connect_stream(latch)
81
- dispatch_action(closed_with_exception) unless closed_with_exception.nil?
80
+ action = connect_stream(latch)
81
+ dispatch_action(action)
82
82
  @config.logger.info('connect_stream thread finished.') if @config.debug_enabled
83
83
  @config.logger.error('#### DISCONNECTED')
84
84
  end
@@ -96,7 +96,7 @@ module SplitIoClient
96
96
  raise 'eof exception' if partial_data == :eof
97
97
  rescue Errno::EBADF, IOError => e
98
98
  @config.logger.error(e.inspect)
99
- return nil
99
+ return Constants::PUSH_NONRETRYABLE_ERROR
100
100
  rescue StandardError => e
101
101
  @config.logger.error("Error reading partial data: #{e.inspect}") if @config.debug_enabled
102
102
  return Constants::PUSH_RETRYABLE_ERROR
@@ -104,7 +104,7 @@ module SplitIoClient
104
104
 
105
105
  process_data(partial_data)
106
106
  end
107
- nil
107
+ Constants::PUSH_NONRETRYABLE_ERROR
108
108
  end
109
109
 
110
110
  def socket_write(latch)
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.3.3.pre.rc14'
2
+ VERSION = '7.3.3.pre.rc15'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splitclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.3.pre.rc14
4
+ version: 7.3.3.pre.rc15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-24 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: allocation_stats