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:
parent
792fe4b29c
commit
449b3ca7b0
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue