splitclient-rb 7.3.3.pre.rc7-java → 7.3.3.pre.rc11-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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7eed42691d0baf11920f4246d2fb9f91db37765
|
4
|
+
data.tar.gz: 92b90bb3f3891ecf3848839321cd3562b405a4ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
11
|
-
|
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)
|
@@ -36,10 +36,14 @@ module SplitIoClient
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def close(action = Constants::PUSH_NONRETRYABLE_ERROR)
|
39
|
-
|
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(
|
91
|
-
|
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)
|
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.
|
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-
|
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
|