splitclient-rb 8.11.1.pre.rc1-java → 8.11.1.pre.rc2-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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ebd679f43658bf97a720066c1a1e3f93a55636cde03db0b682f83fec23f922e
|
|
4
|
+
data.tar.gz: 4407190f4f837760ef77b21eb63be8e3cdf4c6e5f1d02f62fdc597fb57380d7f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d0534cc4f2461bda7ea9046d67612c8fe52115b17172ee1d44b03d2c730e0554cc5f288ca7c95ae501dd142bd17d474ca3441e9127b04b2a3bd0487bef8d765
|
|
7
|
+
data.tar.gz: 063eb4fd186b256e9c1e80ba00c9488fa8009929505bdd669964136df5ffdf3858ad5091877275cceb9d6f5aa81f2ec71414fc7557902df1517cc495000fab02
|
|
@@ -16,17 +16,21 @@ module SplitIoClient
|
|
|
16
16
|
response = @auth_api_client.authenticate(@api_key)
|
|
17
17
|
@config.logger.debug("Auth service response push_enabled: #{response[:push_enabled]}") if @config.debug_enabled
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
schedule_next_token_refresh(response[:
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
unless response[:push_enabled]
|
|
20
|
+
schedule_next_token_refresh(@back_off.interval) if response[:retry]
|
|
21
|
+
return false
|
|
22
|
+
end
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
unless @sse_handler.start(response[:token], response[:channels])
|
|
25
|
+
@config.logger.debug('Streaming server returned error') if @config.debug_enabled
|
|
26
|
+
stop_sse
|
|
27
|
+
return false
|
|
25
28
|
end
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
schedule_next_token_refresh(response[:exp])
|
|
31
|
+
@back_off.reset
|
|
32
|
+
record_telemetry(response[:exp])
|
|
33
|
+
true
|
|
30
34
|
rescue StandardError => e
|
|
31
35
|
@config.logger.error("start_sse: #{e.inspect}")
|
|
32
36
|
end
|
|
@@ -37,17 +37,15 @@ module SplitIoClient
|
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def close(status = nil)
|
|
40
|
-
|
|
41
|
-
@config.logger.debug('SSEClient already disconected.') if @config.debug_enabled
|
|
42
|
-
return
|
|
43
|
-
end
|
|
44
|
-
@config.logger.debug("Closing SSEClient socket") if @config.debug_enabled
|
|
40
|
+
return if @socket.nil?
|
|
45
41
|
|
|
42
|
+
@config.logger.debug("Closing SSEClient socket") if @config.debug_enabled
|
|
46
43
|
push_status(status)
|
|
47
44
|
@connected.make_false
|
|
48
45
|
@socket.sync_close = true if @socket.is_a? OpenSSL::SSL::SSLSocket
|
|
49
46
|
@socket.close
|
|
50
47
|
@config.logger.debug("SSEClient socket state #{@socket.state}") if @socket.is_a?(OpenSSL::SSL::SSLSocket) && @config.debug_enabled
|
|
48
|
+
@socket = nil
|
|
51
49
|
rescue StandardError => e
|
|
52
50
|
@config.logger.error("SSEClient close Error: #{e.inspect}")
|
|
53
51
|
end
|
|
@@ -80,7 +78,7 @@ module SplitIoClient
|
|
|
80
78
|
@config.threads[:connect_stream] = Thread.new do
|
|
81
79
|
@config.logger.info('Starting connect_stream thread ...')
|
|
82
80
|
new_status = connect_stream(latch)
|
|
83
|
-
push_status(new_status)
|
|
81
|
+
push_status(new_status) unless new_status.nil?
|
|
84
82
|
@config.logger.info('connect_stream thread finished.')
|
|
85
83
|
end
|
|
86
84
|
end
|
|
@@ -93,11 +91,6 @@ module SplitIoClient
|
|
|
93
91
|
begin
|
|
94
92
|
partial_data = @socket.readpartial(10_000)
|
|
95
93
|
read_first_event(partial_data, latch)
|
|
96
|
-
|
|
97
|
-
if partial_data == :eof
|
|
98
|
-
@config.logger.error("SSE recived EOF unexpectedly")
|
|
99
|
-
return Constants::PUSH_RETRYABLE_ERROR
|
|
100
|
-
end
|
|
101
94
|
rescue IO::WaitReadable => e
|
|
102
95
|
@config.logger.debug("SSE client IO::WaitReadable transient error: #{e.inspect}") if @config.debug_enabled
|
|
103
96
|
IO.select([@socket], nil, nil, @read_timeout)
|
|
@@ -110,7 +103,7 @@ module SplitIoClient
|
|
|
110
103
|
@config.logger.error("SSE read operation timed out!: #{e.inspect}")
|
|
111
104
|
return Constants::PUSH_RETRYABLE_ERROR
|
|
112
105
|
rescue EOFError => e
|
|
113
|
-
@config.logger.error("SSE read operation EOF
|
|
106
|
+
@config.logger.error("SSE read operation EOF, server closed the connection, will reconnect: #{e.inspect}")
|
|
114
107
|
return Constants::PUSH_RETRYABLE_ERROR
|
|
115
108
|
rescue Errno::EBADF, IOError => e
|
|
116
109
|
@config.logger.error("SSE read operation EBADF or IOError: #{e.inspect}")
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: splitclient-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.11.1.pre.
|
|
4
|
+
version: 8.11.1.pre.rc2
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Split Software
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-07-
|
|
10
|
+
date: 2026-07-22 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: allocation_stats
|