splitclient-rb 7.3.3.pre.rc9-java → 7.3.3.pre.rc10-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: cef1d0e7796aa26ef80add139ea7cc9fbd671803
|
4
|
+
data.tar.gz: 7cb0de04898f2a9fc5e4c1f041bfd5f948a3aecb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8991127acb956b9bb256fb4ef34f5612d9b75d0e64079c222469499729c103ee07db89e6cae4a5d57b981daaa001cd959efaff80fd958902327b033e886e8231
|
7
|
+
data.tar.gz: ab57a7f198719c6e9e3e0dd20c26800fc6f2b4a95be2cde03b31ce53f21abb9f65e8a04d9241fe25e948cd244135dcf57a56545708e6346350ff64fea1bbf0a5
|
@@ -8,8 +8,9 @@ module SplitIoClient
|
|
8
8
|
|
9
9
|
unless thread.nil?
|
10
10
|
config.logger.debug("Stopping #{thread_sym} thread...") if config.debug_enabled
|
11
|
-
|
12
|
-
Thread.kill
|
11
|
+
config.logger.debug("################## #{thread.status}") if config.debug_enabled
|
12
|
+
Thread.kill thread
|
13
|
+
config.logger.debug("#{thread_sym} killed.") if config.debug_enabled
|
13
14
|
end
|
14
15
|
rescue StandardError => e
|
15
16
|
config.logger.error(e.inspect)
|
@@ -37,7 +37,6 @@ module SplitIoClient
|
|
37
37
|
|
38
38
|
def close(action = Constants::PUSH_NONRETRYABLE_ERROR)
|
39
39
|
@connected.make_false
|
40
|
-
SplitIoClient::Helpers::ThreadHelper.stop(:connect_stream, @config)
|
41
40
|
@socket&.close
|
42
41
|
dispatch_action(action)
|
43
42
|
rescue StandardError => e
|
@@ -72,12 +71,14 @@ module SplitIoClient
|
|
72
71
|
def connect_thread(latch)
|
73
72
|
@config.threads[:connect_stream] = Thread.new do
|
74
73
|
@config.logger.info('Starting connect_stream thread ...') if @config.debug_enabled
|
75
|
-
connect_stream(latch)
|
74
|
+
closed_with_exception = connect_stream(latch)
|
75
|
+
close(closed_with_exception) unless closed_with_exception.nil?
|
76
|
+
@config.logger.info('connect_stream thread finished.') if @config.debug_enabled
|
76
77
|
end
|
77
78
|
end
|
78
79
|
|
79
80
|
def connect_stream(latch)
|
80
|
-
socket_write(latch)
|
81
|
+
return Constants::PUSH_NONRETRYABLE_ERROR unless socket_write(latch)
|
81
82
|
|
82
83
|
while connected? || @first_event.value
|
83
84
|
begin
|
@@ -88,22 +89,23 @@ module SplitIoClient
|
|
88
89
|
raise 'eof exception' if partial_data == :eof
|
89
90
|
rescue StandardError => e
|
90
91
|
@config.logger.error('Error reading partial data: ' + e.inspect) if @config.debug_enabled
|
91
|
-
|
92
|
-
return
|
92
|
+
return Constants::PUSH_RETRYABLE_ERROR
|
93
93
|
end
|
94
94
|
|
95
95
|
process_data(partial_data)
|
96
96
|
end
|
97
|
+
nil
|
97
98
|
end
|
98
99
|
|
99
100
|
def socket_write(latch)
|
100
101
|
@first_event.make_true
|
101
102
|
@socket = socket_connect
|
102
103
|
@socket.write(build_request(@uri))
|
104
|
+
true
|
103
105
|
rescue StandardError => e
|
104
106
|
@config.logger.error("Error during connecting to #{@uri.host}. Error: #{e.inspect}")
|
105
|
-
close(Constants::PUSH_NONRETRYABLE_ERROR)
|
106
107
|
latch.count_down
|
108
|
+
false
|
107
109
|
end
|
108
110
|
|
109
111
|
def read_first_event(data, latch)
|