splitclient-rb 8.11.1.pre.rc2-java → 8.11.1.pre.rc3-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: 745e905d4a8d76fb1d0190aab59fff21d911a4d11811e66ca5ffeb42d9612746
|
|
4
|
+
data.tar.gz: a6d392d0c8c0cf82eddd7894735358a3bf9198519c28fe8a1fc4c6b305bbc604
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3fbf4aef5590f7edbb022d9b7498469e89bd117a52661f4b01f4421ba140aac511aa63a463cc7f8c02f9c24d7f1898b9cb3985ba906b45c188e450c26a2d628
|
|
7
|
+
data.tar.gz: b2283bf713d151238189fe59e29faa8c11a956a0009b04e9123d79a3df751c1cefd1a57d6e3e452453f7122e35c92342e68140b251321b9b6c884dc83f2d74c3
|
|
@@ -55,8 +55,8 @@ module SplitIoClient
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def start_periodic_fetch
|
|
58
|
-
@split_fetcher.call
|
|
59
|
-
@segment_fetcher.call
|
|
58
|
+
@split_fetcher.call unless Helpers::ThreadHelper.alive?(:split_fetcher, @config)
|
|
59
|
+
@segment_fetcher.call unless Helpers::ThreadHelper.alive?(:segment_fetcher, @config)
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
def stop_periodic_fetch
|
|
@@ -90,7 +90,9 @@ module SplitIoClient
|
|
|
90
90
|
if IO.select([@socket], nil, nil, @read_timeout)
|
|
91
91
|
begin
|
|
92
92
|
partial_data = @socket.readpartial(10_000)
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
first_event_status = read_first_event(partial_data, latch)
|
|
95
|
+
return first_event_status unless first_event_status.nil?
|
|
94
96
|
rescue IO::WaitReadable => e
|
|
95
97
|
@config.logger.debug("SSE client IO::WaitReadable transient error: #{e.inspect}") if @config.debug_enabled
|
|
96
98
|
IO.select([@socket], nil, nil, @read_timeout)
|
|
@@ -119,12 +121,9 @@ module SplitIoClient
|
|
|
119
121
|
@config.logger.error("SSE read operation timed out, no data available.")
|
|
120
122
|
return Constants::PUSH_RETRYABLE_ERROR
|
|
121
123
|
end
|
|
122
|
-
rescue Errno::EBADF
|
|
123
|
-
@config.logger.debug("SSE socket is not connected (Errno::EBADF)") if @config.debug_enabled
|
|
124
|
-
break
|
|
125
124
|
rescue Exception => e
|
|
126
125
|
@config.logger.debug("SSE socket is not connected: #{e.inspect}") if @config.debug_enabled
|
|
127
|
-
|
|
126
|
+
return Constants::PUSH_RETRYABLE_ERROR
|
|
128
127
|
end
|
|
129
128
|
|
|
130
129
|
process_data(partial_data)
|
|
@@ -151,19 +150,20 @@ module SplitIoClient
|
|
|
151
150
|
response_code = @event_parser.first_event(data)
|
|
152
151
|
@config.logger.debug("SSE client first event code: #{response_code}") if @config.debug_enabled
|
|
153
152
|
|
|
154
|
-
error_event = false
|
|
155
|
-
events = @event_parser.parse(data)
|
|
156
|
-
events.each { |e| error_event = true if e.event_type == ERROR_EVENT_TYPE }
|
|
157
153
|
@first_event.make_false
|
|
158
154
|
|
|
159
|
-
if response_code
|
|
160
|
-
@
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
push_status(Constants::PUSH_CONNECTED)
|
|
155
|
+
if response_code != OK_CODE
|
|
156
|
+
@config.logger.error("SSE first event failed, code: #{response_code}")
|
|
157
|
+
latch.count_down
|
|
158
|
+
return Constants::PUSH_RETRYABLE_ERROR
|
|
164
159
|
end
|
|
165
160
|
|
|
161
|
+
@connected.make_true
|
|
162
|
+
@config.logger.debug("SSE client first event Connected is true") if @config.debug_enabled
|
|
163
|
+
@telemetry_runtime_producer.record_streaming_event(Telemetry::Domain::Constants::SSE_CONNECTION_ESTABLISHED, nil)
|
|
164
|
+
push_status(Constants::PUSH_CONNECTED)
|
|
166
165
|
latch.count_down
|
|
166
|
+
return nil
|
|
167
167
|
end
|
|
168
168
|
|
|
169
169
|
def socket_connect
|