splitclient-rb 7.3.3.pre.rc8-java → 7.3.3.pre.rc12-java
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a8f3ad1261ef01e4087b8db07527d34c8d53e26
|
4
|
+
data.tar.gz: 4d3459058da480da12ca745831b3d5db695febd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2e3e9637b0404cd1c8423c5de5e84028c8933c4de3b5b2b141dc13e4fd66c3aeab71026f815637482a817c3b378c82a82a6a60fe5c94a6d9bc8da95477b0e6e
|
7
|
+
data.tar.gz: 714ca68654d29775fd1332ae79fd22648cd4e2040034fe22ed1c1d3dd3632688c54a70fe1d00991334abe6742f1aa59b10deb650ff1be56ae78e2eec542f1a54
|
@@ -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
|
@@ -71,13 +75,17 @@ module SplitIoClient
|
|
71
75
|
|
72
76
|
def connect_thread(latch)
|
73
77
|
@config.threads[:connect_stream] = Thread.new do
|
78
|
+
@config.logger.error('# CONNECT THREAD')
|
74
79
|
@config.logger.info('Starting connect_stream thread ...') if @config.debug_enabled
|
75
|
-
connect_stream(latch)
|
80
|
+
closed_with_exception = connect_stream(latch)
|
81
|
+
close(closed_with_exception) unless closed_with_exception.nil?
|
82
|
+
@config.logger.info('connect_stream thread finished.') if @config.debug_enabled
|
83
|
+
@config.logger.error('# DISCONNECTED THREAD')
|
76
84
|
end
|
77
85
|
end
|
78
86
|
|
79
87
|
def connect_stream(latch)
|
80
|
-
socket_write(latch)
|
88
|
+
return Constants::PUSH_NONRETRYABLE_ERROR unless socket_write(latch)
|
81
89
|
|
82
90
|
while connected? || @first_event.value
|
83
91
|
begin
|
@@ -86,24 +94,28 @@ module SplitIoClient
|
|
86
94
|
read_first_event(partial_data, latch)
|
87
95
|
|
88
96
|
raise 'eof exception' if partial_data == :eof
|
97
|
+
rescue Errno::EBADF, IOError => e
|
98
|
+
@config.logger.error(e.inspect)
|
99
|
+
return nil
|
89
100
|
rescue StandardError => e
|
90
|
-
@config.logger.error(
|
91
|
-
|
92
|
-
return
|
101
|
+
@config.logger.error("Error reading partial data: #{e.inspect}") if @config.debug_enabled
|
102
|
+
return Constants::PUSH_RETRYABLE_ERROR
|
93
103
|
end
|
94
104
|
|
95
105
|
process_data(partial_data)
|
96
106
|
end
|
107
|
+
nil
|
97
108
|
end
|
98
109
|
|
99
110
|
def socket_write(latch)
|
100
111
|
@first_event.make_true
|
101
112
|
@socket = socket_connect
|
102
113
|
@socket.write(build_request(@uri))
|
114
|
+
true
|
103
115
|
rescue StandardError => e
|
104
116
|
@config.logger.error("Error during connecting to #{@uri.host}. Error: #{e.inspect}")
|
105
|
-
close(Constants::PUSH_NONRETRYABLE_ERROR)
|
106
117
|
latch.count_down
|
118
|
+
false
|
107
119
|
end
|
108
120
|
|
109
121
|
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.rc12
|
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
|