splitclient-rb 8.10.0.pre.rc6-java → 8.10.0.pre.rc7-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 +4 -4
- data/lib/splitclient-rb/sse/event_source/client.rb +45 -32
- data/lib/splitclient-rb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07bc9672156deaf379729c6ce11c05f384e8891a34d9d2f2ab6043f966240663
|
|
4
|
+
data.tar.gz: ba4f8c9239766472b406a5ac8c3d95389045d2bd74bc415833ea2a4280e67fe3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3130f42da606a0ed8f0aeaac6d43300a6bd3bbbd7ca761b479fc2bf0afa26b195ae07ba65453bd569fd3ef3281c42a5faa7af4bad6f7ddda71e96455611b510
|
|
7
|
+
data.tar.gz: 0bc86bb1de4e19ae132ee0a1cbb5a13c099898ac5e18cf447461006b975b27995f9bf005f19c4b2cdabe89e4fb9d17201fd580dc168d69d7b3910bde87d5e127
|
|
@@ -41,9 +41,12 @@ module SplitIoClient
|
|
|
41
41
|
@config.logger.debug('SSEClient already disconected.')
|
|
42
42
|
return
|
|
43
43
|
end
|
|
44
|
+
@config.logger.debug("Closing SSEClient socket")
|
|
44
45
|
|
|
45
46
|
@connected.make_false
|
|
47
|
+
@socket.sync_close = true if @socket.is_a? OpenSSL::SSL::SSLSocket
|
|
46
48
|
@socket.close
|
|
49
|
+
@config.logger.debug("SSEClient socket state #{@socket.state}") if @socket.is_a? OpenSSL::SSL::SSLSocket
|
|
47
50
|
push_status(status)
|
|
48
51
|
rescue StandardError => e
|
|
49
52
|
@config.logger.error("SSEClient close Error: #{e.inspect}")
|
|
@@ -57,7 +60,6 @@ module SplitIoClient
|
|
|
57
60
|
|
|
58
61
|
@uri = URI(url)
|
|
59
62
|
latch = Concurrent::CountDownLatch.new(1)
|
|
60
|
-
|
|
61
63
|
connect_thread(latch)
|
|
62
64
|
|
|
63
65
|
return false unless latch.wait(CONNECT_TIMEOUT)
|
|
@@ -86,39 +88,50 @@ module SplitIoClient
|
|
|
86
88
|
def connect_stream(latch)
|
|
87
89
|
return Constants::PUSH_NONRETRYABLE_ERROR unless socket_write(latch)
|
|
88
90
|
while connected? || @first_event.value
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
91
|
+
begin
|
|
92
|
+
if IO.select([@socket], nil, nil, @read_timeout)
|
|
93
|
+
begin
|
|
94
|
+
partial_data = @socket.readpartial(10_000)
|
|
95
|
+
read_first_event(partial_data, latch)
|
|
96
|
+
|
|
97
|
+
raise 'eof exception' if partial_data == :eof
|
|
98
|
+
rescue IO::WaitReadable => e
|
|
99
|
+
@config.logger.debug("SSE client IO::WaitReadable transient error: #{e.inspect}")
|
|
100
|
+
IO.select([@socket], nil, nil, @read_timeout)
|
|
101
|
+
retry
|
|
102
|
+
rescue Errno::EAGAIN => e
|
|
103
|
+
@config.logger.debug("SSE client transient error: #{e.inspect}")
|
|
104
|
+
IO.select([@socket], nil, nil, @read_timeout)
|
|
105
|
+
retry
|
|
106
|
+
rescue Errno::ETIMEDOUT => e
|
|
107
|
+
@config.logger.error("SSE read operation timed out!: #{e.inspect}")
|
|
108
|
+
return Constants::PUSH_RETRYABLE_ERROR
|
|
109
|
+
rescue EOFError => e
|
|
110
|
+
puts "SSE read operation EOF Exception!: #{e.inspect}"
|
|
111
|
+
@config.logger.error("SSE read operation EOF Exception!: #{e.inspect}")
|
|
112
|
+
raise 'eof exception'
|
|
113
|
+
rescue Errno::EBADF, IOError => e
|
|
114
|
+
@config.logger.error("SSE read operation EBADF or IOError: #{e.inspect}")
|
|
115
|
+
return Constants::PUSH_RETRYABLE_ERROR
|
|
116
|
+
rescue StandardError => e
|
|
117
|
+
@config.logger.error("SSE read operation StandardError: #{e.inspect}")
|
|
118
|
+
return nil if ENV['SPLITCLIENT_ENV'] == 'test'
|
|
119
|
+
|
|
120
|
+
@config.logger.error("Error reading partial data: #{e.inspect}")
|
|
121
|
+
return Constants::PUSH_RETRYABLE_ERROR
|
|
122
|
+
end
|
|
123
|
+
else
|
|
124
|
+
@config.logger.error("SSE read operation timed out, no data available.")
|
|
117
125
|
return Constants::PUSH_RETRYABLE_ERROR
|
|
118
126
|
end
|
|
119
|
-
|
|
120
|
-
@config.logger.
|
|
121
|
-
|
|
127
|
+
rescue Errno::EBADF
|
|
128
|
+
@config.logger.debug("SSE socket is not connected (Errno::EBADF)")
|
|
129
|
+
break
|
|
130
|
+
rescue RuntimeError
|
|
131
|
+
raise 'eof exception'
|
|
132
|
+
rescue Exception => e
|
|
133
|
+
@config.logger.debug("SSE socket is not connected: #{e.inspect}")
|
|
134
|
+
break
|
|
122
135
|
end
|
|
123
136
|
|
|
124
137
|
process_data(partial_data)
|
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.10.0.pre.
|
|
4
|
+
version: 8.10.0.pre.rc7
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Split Software
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-11-
|
|
10
|
+
date: 2025-11-14 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: allocation_stats
|