splitclient-rb 7.3.3.pre.rc9-java → 7.3.3.pre.rc10-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7559596cd586d0f10072b19ae92405c4dbe86769
4
- data.tar.gz: 33c75e02ac664366d0ad33b37b1ec189ff0dd152
3
+ metadata.gz: cef1d0e7796aa26ef80add139ea7cc9fbd671803
4
+ data.tar.gz: 7cb0de04898f2a9fc5e4c1f041bfd5f948a3aecb
5
5
  SHA512:
6
- metadata.gz: 3a83f873bec9b91ae7e176cc96b247236aa9eb7e5c693ce74a7f3adb16823c42ebd4b239eb6210c981e5e37cd912943510eb21a92414025416224114bcbbb9da
7
- data.tar.gz: 6775ae98766d910f269ba6a114099ed853b14ca9794c2324a3b5c0a4bbfff3bfb6de133e18ca85ab5771a03c53b88677f5ca8a6161685e6ca93b54f13fd08266
6
+ metadata.gz: 8991127acb956b9bb256fb4ef34f5612d9b75d0e64079c222469499729c103ee07db89e6cae4a5d57b981daaa001cd959efaff80fd958902327b033e886e8231
7
+ data.tar.gz: ab57a7f198719c6e9e3e0dd20c26800fc6f2b4a95be2cde03b31ce53f21abb9f65e8a04d9241fe25e948cd244135dcf57a56545708e6346350ff64fea1bbf0a5
@@ -8,8 +8,9 @@ module SplitIoClient
8
8
 
9
9
  unless thread.nil?
10
10
  config.logger.debug("Stopping #{thread_sym} thread...") if config.debug_enabled
11
- sleep(0.1) while thread.status == 'run'
12
- Thread.kill(thread)
11
+ config.logger.debug("################## #{thread.status}") if config.debug_enabled
12
+ Thread.kill thread
13
+ config.logger.debug("#{thread_sym} killed.") if config.debug_enabled
13
14
  end
14
15
  rescue StandardError => e
15
16
  config.logger.error(e.inspect)
@@ -37,7 +37,6 @@ module SplitIoClient
37
37
 
38
38
  def close(action = Constants::PUSH_NONRETRYABLE_ERROR)
39
39
  @connected.make_false
40
- SplitIoClient::Helpers::ThreadHelper.stop(:connect_stream, @config)
41
40
  @socket&.close
42
41
  dispatch_action(action)
43
42
  rescue StandardError => e
@@ -72,12 +71,14 @@ module SplitIoClient
72
71
  def connect_thread(latch)
73
72
  @config.threads[:connect_stream] = Thread.new do
74
73
  @config.logger.info('Starting connect_stream thread ...') if @config.debug_enabled
75
- connect_stream(latch)
74
+ closed_with_exception = connect_stream(latch)
75
+ close(closed_with_exception) unless closed_with_exception.nil?
76
+ @config.logger.info('connect_stream thread finished.') if @config.debug_enabled
76
77
  end
77
78
  end
78
79
 
79
80
  def connect_stream(latch)
80
- socket_write(latch)
81
+ return Constants::PUSH_NONRETRYABLE_ERROR unless socket_write(latch)
81
82
 
82
83
  while connected? || @first_event.value
83
84
  begin
@@ -88,22 +89,23 @@ module SplitIoClient
88
89
  raise 'eof exception' if partial_data == :eof
89
90
  rescue StandardError => e
90
91
  @config.logger.error('Error reading partial data: ' + e.inspect) if @config.debug_enabled
91
- close(Constants::PUSH_RETRYABLE_ERROR)
92
- return
92
+ return Constants::PUSH_RETRYABLE_ERROR
93
93
  end
94
94
 
95
95
  process_data(partial_data)
96
96
  end
97
+ nil
97
98
  end
98
99
 
99
100
  def socket_write(latch)
100
101
  @first_event.make_true
101
102
  @socket = socket_connect
102
103
  @socket.write(build_request(@uri))
104
+ true
103
105
  rescue StandardError => e
104
106
  @config.logger.error("Error during connecting to #{@uri.host}. Error: #{e.inspect}")
105
- close(Constants::PUSH_NONRETRYABLE_ERROR)
106
107
  latch.count_down
108
+ false
107
109
  end
108
110
 
109
111
  def read_first_event(data, latch)
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.3.3.pre.rc9'
2
+ VERSION = '7.3.3.pre.rc10'
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.rc9
4
+ version: 7.3.3.pre.rc10
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software