1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Initialize subscriptions as early as possible

This commit is contained in:
Pratik Naik 2015-01-16 22:09:26 +05:30
parent 792fe4b29c
commit 449b3ca7b0

View file

@ -2,7 +2,6 @@ require 'set'
module ActionCable
class Server < Cramp::Websocket
on_start :initialize_subscriptions
on_data :received_data
on_finish :cleanup_subscriptions
@ -15,8 +14,10 @@ module ActionCable
end
end
def initialize_subscriptions
def initialize(*)
@subscriptions = {}
super
end
def received_data(data)