diff options
Diffstat (limited to 'lib/action_cable/connection')
-rw-r--r-- | lib/action_cable/connection/base.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb index e5d63abe5b..2da1b74c76 100644 --- a/lib/action_cable/connection/base.rb +++ b/lib/action_cable/connection/base.rb @@ -30,7 +30,7 @@ module ActionCable websocket.on(:message) { |event| on_message event.data } websocket.on(:close) { |event| send_async :on_close } - websocket.rack_response + respond_to_successful_request else respond_to_invalid_request end @@ -104,6 +104,10 @@ module ActionCable end + def respond_to_successful_request + websocket.rack_response + end + def respond_to_invalid_request logger.info finished_request_message [ 404, { 'Content-Type' => 'text/plain' }, [ 'Page not found' ] ] |