splitclient-rb 7.1.0.pre.rc17-java → 7.1.0.pre.rc18-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: a1c3771f8d3caa98de2bb24358d52573cb6c02d0
4
- data.tar.gz: 4ba4ff5be448c1cce2618240ff47d13007ef10d5
3
+ metadata.gz: 0ac90caee39959dfef51cb39d592dd138f2bb6d4
4
+ data.tar.gz: '02876c0465b3de13217d5f866a213a7abde1d8e8'
5
5
  SHA512:
6
- metadata.gz: 0c43bf377bb7388b1b8003d8898a85067d567b38bc9079ce9e3240fc5d76474ebf74dde5be594aaebf15fe966fcd9a6c1e3e2f37559b089d21224b4817ae411c
7
- data.tar.gz: f272098c23e90419a01789a9c8d2f97167d4b156fa965fdc5d7b563698c714aea41c89f31c0fe37057a6a866d1ba35ef3f93ba94916e885f23df792f50c3969e
6
+ metadata.gz: 8efc3aedc3e5580edda24d664221998998fadaaf99c492255fa27725797d0770d6e5f2cfb9752b74527406ddbd877345ffeb46c59257403df707d6f33d1da511
7
+ data.tar.gz: a2b6b3dee738bd03d370bdeb94694ce56893cf0e1131b52ea3df69d74b0ccf53f189987563456ada85b4cad37e4419b27ee0ffeb3fe2c9263f34c330a3018730
@@ -86,14 +86,6 @@ module SplitIoClient
86
86
  end
87
87
  end
88
88
 
89
- def stream_start_thread_forked
90
- PhusionPassenger.on_event(:starting_worker_process) { |forked| stream_start_thread if forked }
91
- end
92
-
93
- def stream_start_sse_thread_forked
94
- PhusionPassenger.on_event(:starting_worker_process) { |forked| stream_start_sse_thread if forked }
95
- end
96
-
97
89
  def start_stream_forked
98
90
  PhusionPassenger.on_event(:starting_worker_process) { |forked| start_stream if forked }
99
91
  end
@@ -65,10 +65,6 @@ module SplitIoClient
65
65
  end
66
66
  end
67
67
 
68
- def connect_passenger_forked
69
- PhusionPassenger.on_event(:starting_worker_process) { |forked| connect_thread if forked }
70
- end
71
-
72
68
  def connect_stream
73
69
  interval = @back_off.interval
74
70
  sleep(interval) if interval.positive?
@@ -111,9 +107,7 @@ module SplitIoClient
111
107
  unless partial_data.nil? || partial_data == KEEP_ALIVE_RESPONSE
112
108
  @config.logger.debug("Event partial data: #{partial_data}") if @config.debug_enabled
113
109
  buffer = read_partial_data(partial_data)
114
- events = parse_event(buffer)
115
-
116
- dispatch_event(events)
110
+ parse_event(buffer)
117
111
  end
118
112
  rescue StandardError => e
119
113
  @config.logger.error("process_data error: #{e.inspect}")
@@ -137,7 +131,6 @@ module SplitIoClient
137
131
 
138
132
  def parse_event(buffer)
139
133
  type = nil
140
- events = []
141
134
 
142
135
  buffer.each do |d|
143
136
  splited_data = d.split(':')
@@ -147,15 +140,14 @@ module SplitIoClient
147
140
  type = splited_data[1].strip
148
141
  when 'data'
149
142
  data = parse_event_data(d, type)
150
- events << StreamData.new(type, data[:client_id], data[:data], data[:channel]) unless type.nil? || data[:data].nil?
143
+ unless type.nil? || data[:data].nil?
144
+ event = StreamData.new(type, data[:client_id], data[:data], data[:channel])
145
+ dispatch_event(event)
146
+ end
151
147
  end
152
148
  end
153
-
154
- events
155
149
  rescue StandardError => e
156
- @config.logger.error(buffer)
157
150
  @config.logger.error("Error during parsing a event: #{e.inspect}")
158
- []
159
151
  end
160
152
 
161
153
  def parse_event_data(data, type)
@@ -168,13 +160,11 @@ module SplitIoClient
168
160
  { client_id: client_id, channel: channel, data: parsed_data }
169
161
  end
170
162
 
171
- def dispatch_event(events)
172
- events.each do |event|
173
- raise SSEClientException.new(event), 'Error event' if event.event_type == 'error'
163
+ def dispatch_event(event)
164
+ raise SSEClientException.new(event), 'Error event' if event.event_type == 'error'
174
165
 
175
- @config.logger.debug("Dispatching event: #{event.event_type}, #{event.channel}") if @config.debug_enabled
176
- @on[:event].call(event)
177
- end
166
+ @config.logger.debug("Dispatching event: #{event.event_type}, #{event.channel}") if @config.debug_enabled
167
+ @on[:event].call(event)
178
168
  rescue SSEClientException => e
179
169
  @config.logger.error("Event error: #{e.event.event_type}, #{e.event.data}")
180
170
  close
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.1.0.pre.rc17'
2
+ VERSION = '7.1.0.pre.rc18'
3
3
  end
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.1.0.pre.rc17
4
+ version: 7.1.0.pre.rc18
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-27 00:00:00.000000000 Z
11
+ date: 2020-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement