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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 910b3c2fa209ff77e5f8fce756ee873d2bd7f254e450baf7e39ebc715b9f96ae
4
- data.tar.gz: ee7b91eb9a0ccb26cb6063768b98b23fa4666650d64b72625b3f1299a14d4175
3
+ metadata.gz: 07bc9672156deaf379729c6ce11c05f384e8891a34d9d2f2ab6043f966240663
4
+ data.tar.gz: ba4f8c9239766472b406a5ac8c3d95389045d2bd74bc415833ea2a4280e67fe3
5
5
  SHA512:
6
- metadata.gz: 1475a505e93473704d0cd65b8b4c5575072c2a67bec47c79f31f14b4f7846f90628a7779d15c1385a653c9802021afeb70d12a6895e0a9ec1ff84e9464fecf8e
7
- data.tar.gz: 461ef75703b0bdb976ef091f92e3df0148cef5ee5ccfbed80f6f43dfab8c5f3112bd6f3eae47353942aa501173dadd395c2fbac1b686f688b119802b466894a2
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
- if IO.select([@socket], nil, nil, @read_timeout)
90
- begin
91
- partial_data = @socket.readpartial(10_000)
92
- read_first_event(partial_data, latch)
93
-
94
- raise 'eof exception' if partial_data == :eof
95
- rescue IO::WaitReadable => e
96
- @config.logger.debug("SSE client IO::WaitReadable transient error: #{e.inspect}")
97
- IO.select([@socket], nil, nil, @read_timeout)
98
- retry
99
- rescue Errno::EAGAIN => e
100
- @config.logger.debug("SSE client transient error: #{e.inspect}")
101
- IO.select([@socket], nil, nil, @read_timeout)
102
- retry
103
- rescue Errno::ETIMEDOUT => e
104
- @config.logger.error("SSE read operation timed out!: #{e.inspect}")
105
- return Constants::PUSH_RETRYABLE_ERROR
106
- rescue EOFError => e
107
- @config.logger.error("SSE read operation EOF Exception!: #{e.inspect}")
108
- raise 'eof exception'
109
- rescue Errno::EBADF, IOError => e
110
- @config.logger.error("SSE read operation EBADF or IOError: #{e.inspect}")
111
- return Constants::PUSH_RETRYABLE_ERROR
112
- rescue StandardError => e
113
- @config.logger.error("SSE read operation StandardError: #{e.inspect}")
114
- return nil if ENV['SPLITCLIENT_ENV'] == 'test'
115
-
116
- @config.logger.error("Error reading partial data: #{e.inspect}")
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
- else
120
- @config.logger.error("SSE read operation timed out, no data available.")
121
- return Constants::PUSH_RETRYABLE_ERROR
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)
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '8.10.0-rc6'
2
+ VERSION = '8.10.0-rc7'
3
3
  end
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.rc6
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-12 00:00:00.000000000 Z
10
+ date: 2025-11-14 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: allocation_stats