diff options
author | Daniel Rhodes <rhodes.daniel@gmail.com> | 2016-03-01 02:48:15 +0100 |
---|---|---|
committer | Daniel Rhodes <rhodes.daniel@gmail.com> | 2016-03-01 02:48:15 +0100 |
commit | 53e163dc3fd2c77c7967534665e81e0ef40df580 (patch) | |
tree | 1b47cc71917969da7eeee627edcb166036549265 /actioncable/lib/action_cable/connection | |
parent | f51cb7eef5be8e3496ea653fec04bedd6e5ec334 (diff) | |
download | rails-53e163dc3fd2c77c7967534665e81e0ef40df580.tar.gz rails-53e163dc3fd2c77c7967534665e81e0ef40df580.tar.bz2 rails-53e163dc3fd2c77c7967534665e81e0ef40df580.zip |
Make ping into a message type
This change makes ping into a message type, which
makes the whole protocol a lot more consistent.
Also fixes hacks on the client side to make this all
work.
Diffstat (limited to 'actioncable/lib/action_cable/connection')
-rw-r--r-- | actioncable/lib/action_cable/connection/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actioncable/lib/action_cable/connection/base.rb b/actioncable/lib/action_cable/connection/base.rb index 7a9507fbd9..79253ef4ef 100644 --- a/actioncable/lib/action_cable/connection/base.rb +++ b/actioncable/lib/action_cable/connection/base.rb @@ -114,7 +114,7 @@ module ActionCable end def beat - transmit ActiveSupport::JSON.encode(identifier: ActionCable::INTERNAL[:identifiers][:ping], message: Time.now.to_i) + transmit ActiveSupport::JSON.encode(type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i) end def on_open # :nodoc: |