diff options
Diffstat (limited to 'lib/action_cable/connection/base.rb')
-rw-r--r-- | lib/action_cable/connection/base.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb index 09bbc73e2d..1a9aac0731 100644 --- a/lib/action_cable/connection/base.rb +++ b/lib/action_cable/connection/base.rb @@ -3,6 +3,7 @@ module ActionCable class Base include Identification include InternalChannel + include Authorization attr_reader :server, :env delegate :worker_pool, :pubsub, to: :server @@ -85,6 +86,9 @@ module ActionCable heartbeat.start message_buffer.process! + rescue ActionCable::Connection::Authorization::UnauthorizedError + respond_to_invalid_request + close end def on_message(message) |