splitclient-rb 7.3.3.pre.rc7-java → 7.3.3.pre.rc11-java

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
  SHA1:
3
- metadata.gz: 9c3ef581dc2af691ac92125dbf66345455d8643b
4
- data.tar.gz: b026aa79a61e1ec8b6d732e61b64e401a2678432
3
+ metadata.gz: d7eed42691d0baf11920f4246d2fb9f91db37765
4
+ data.tar.gz: 92b90bb3f3891ecf3848839321cd3562b405a4ff
5
5
  SHA512:
6
- metadata.gz: e0d2ce6bbd3752219c5000792d2a85aec1d559990a1832b79365a754a29b367fe1947d3668f962c3da5c7b5f1e5e5e379daf1fb5edf23626e421db5651823e50
7
- data.tar.gz: 9f6c2338b11a9c154472d497a3aff25b5431d946d969c1d6b490d4e2cbc07b20971d52036ca419d1648d81d3d0a0a1c9ab4d0b38728284b381f8ed7392582b65
6
+ metadata.gz: ee50e3e24092d150afec5c774c00f425faa4786d59733cfb7a3539ae8c483dbdd5ce49f2d1b56e433169ba7ced2b4f15c614a711bd8adbce8d0ffc36adfca5ee
7
+ data.tar.gz: 515315961edd0a16711b531cdb2e1c34e7e310d536ea93e35f150cc078b30a662e789197e7b1317716782f09fad90618c50c7610c1a9c6f25ce9450fec42dbea
@@ -7,9 +7,8 @@ module SplitIoClient
7
7
  thread = config.threads[thread_sym]
8
8
 
9
9
  unless thread.nil?
10
- config.logger.debug("Stopping #{thread_sym} thread...") if config.debug_enabled
11
- sleep(0.1) while thread.status == 'run'
12
- Thread.kill(thread)
10
+ Thread.kill thread
11
+ config.logger.debug("#{thread_sym} killed.") if config.debug_enabled
13
12
  end
14
13
  rescue StandardError => e
15
14
  config.logger.error(e.inspect)
@@ -329,7 +329,7 @@ module SplitIoClient
329
329
  end
330
330
 
331
331
  def self.default_auth_service_url
332
- 'https://auth.split.io/api/auth'
332
+ 'https://auth.split.io/api/v2/auth'
333
333
  end
334
334
 
335
335
  def self.default_auth_retry_back_off_base
@@ -36,10 +36,14 @@ module SplitIoClient
36
36
  end
37
37
 
38
38
  def close(action = Constants::PUSH_NONRETRYABLE_ERROR)
39
- dispatch_action(action)
39
+ unless connected?
40
+ @config.logger.error('SSEClient already disconected.') if @config.debug_enabled
41
+ return
42
+ end
43
+
40
44
  @connected.make_false
41
- SplitIoClient::Helpers::ThreadHelper.stop(:connect_stream, @config)
42
45
  @socket&.close
46
+ dispatch_action(action)
43
47
  rescue StandardError => e
44
48
  @config.logger.error("SSEClient close Error: #{e.inspect}")
45
49
  end
@@ -72,12 +76,14 @@ module SplitIoClient
72
76
  def connect_thread(latch)
73
77
  @config.threads[:connect_stream] = Thread.new do
74
78
  @config.logger.info('Starting connect_stream thread ...') if @config.debug_enabled
75
- connect_stream(latch)
79
+ closed_with_exception = connect_stream(latch)
80
+ close(closed_with_exception) unless closed_with_exception.nil?
81
+ @config.logger.info('connect_stream thread finished.') if @config.debug_enabled
76
82
  end
77
83
  end
78
84
 
79
85
  def connect_stream(latch)
80
- socket_write(latch)
86
+ return Constants::PUSH_NONRETRYABLE_ERROR unless socket_write(latch)
81
87
 
82
88
  while connected? || @first_event.value
83
89
  begin
@@ -86,24 +92,28 @@ module SplitIoClient
86
92
  read_first_event(partial_data, latch)
87
93
 
88
94
  raise 'eof exception' if partial_data == :eof
95
+ rescue Errno::EBADF, IOError => e
96
+ @config.logger.debug(e.inspect)
97
+ return nil
89
98
  rescue StandardError => e
90
- @config.logger.error('Error reading partial data: ' + e.inspect) if @config.debug_enabled
91
- close(Constants::PUSH_RETRYABLE_ERROR)
92
- return
99
+ @config.logger.error("Error reading partial data: #{e.inspect}") if @config.debug_enabled
100
+ return Constants::PUSH_RETRYABLE_ERROR
93
101
  end
94
102
 
95
103
  process_data(partial_data)
96
104
  end
105
+ nil
97
106
  end
98
107
 
99
108
  def socket_write(latch)
100
109
  @first_event.make_true
101
110
  @socket = socket_connect
102
111
  @socket.write(build_request(@uri))
112
+ true
103
113
  rescue StandardError => e
104
114
  @config.logger.error("Error during connecting to #{@uri.host}. Error: #{e.inspect}")
105
- close(Constants::PUSH_NONRETRYABLE_ERROR)
106
115
  latch.count_down
116
+ false
107
117
  end
108
118
 
109
119
  def read_first_event(data, latch)
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.3.3.pre.rc7'
2
+ VERSION = '7.3.3.pre.rc11'
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.rc7
4
+ version: 7.3.3.pre.rc11
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-19 00:00:00.000000000 Z
11
+ date: 2022-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement