lib/async_cable/connection.rb in async_cable-0.1.0 vs lib/async_cable/connection.rb in async_cable-0.2.0
- old
+ new
@@ -24,10 +24,10 @@
# Transmit data to all WS connections in current channel and provided stream.
# @param data [Hash]
def broadcast(stream_name, data)
logger.debug { "#{name}.broadcast data=#{data.inspect}" }
- Registry.find(channel_name, stream_name).each do |conn|
+ Registry.each(channel_name, stream_name) do |conn|
conn.transmit(data) unless conn.closed?
end
end
end