splitclient-rb 7.3.3.pre.rc7 → 7.3.3.pre.rc11
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4d03fabd7e5dd1f65b9544d6c48b5968bd6c9dc893cffd8e564e27fcfc0df87
|
4
|
+
data.tar.gz: b1fb04a17e91d51745c68601baf40adecee18a1a493ddf142205272c5da31a74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4e97a54d96c63ae09fdeaa51186d5283675824a2d139401fc1401b7d06eb181e2d60bdd604e97ac72e9807683d13e8ed2d31e6c036688cb438b777e87393420
|
7
|
+
data.tar.gz: 76703256532c9ec11a54ca35e4f1cf5ba7b79834f5e9bbe2004f101e781387363ddc1ebcf73203fea1c73de9031ffb6ca3b97a9fb13bbce7cb7ab726e2121169
|
@@ -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: ruby
|
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
|
name: allocation_stats
|