dima-exe-juggernaut 0.5.9.1 → 0.5.9.22

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.
Files changed (2) hide show
  1. data/lib/juggernaut/server.rb +9 -8
  2. metadata +1 -1
@@ -172,20 +172,21 @@ module Juggernaut
172
172
  # never throws an exception
173
173
  def publish(msg)
174
174
  logger.debug "Sending msg: #{msg.to_s} to client #{@request[:client_id]} (session #{@request[:session_id]})"
175
- send_data(msg.to_s + CR)
176
- end
177
-
178
- # Connection methods
179
-
180
- def broadcast(bdy)
181
- msg = Juggernaut::Message.new(@current_msg_id += 1, bdy, self.signature)
182
175
  if @http_request
183
176
  msg = add_http_response_headers(msg)
184
177
  send_data(msg)
185
178
  close_connection_after_writing
186
179
  else
187
- publish(msg)
180
+ send_data(msg.to_s + CR)
188
181
  end
182
+
183
+ end
184
+
185
+ # Connection methods
186
+
187
+ def broadcast(bdy)
188
+ msg = Juggernaut::Message.new(@current_msg_id += 1, bdy, self.signature)
189
+ publish(msg)
189
190
  end
190
191
 
191
192
  def mark_dead(reason = "Unknown error")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dima-exe-juggernaut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9.1
4
+ version: 0.5.9.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex MacCaw