aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_cable')
-rw-r--r--lib/action_cable/connection/base.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb
index a629f29643..ac45124a28 100644
--- a/lib/action_cable/connection/base.rb
+++ b/lib/action_cable/connection/base.rb
@@ -151,7 +151,6 @@ module ActionCable
server.add_connection(self)
rescue ActionCable::Connection::Authorization::UnauthorizedError
respond_to_invalid_request
- close
end
def on_message(message)
@@ -186,6 +185,8 @@ module ActionCable
end
def respond_to_invalid_request
+ close if websocket.alive?
+
logger.info finished_request_message
[ 404, { 'Content-Type' => 'text/plain' }, [ 'Page not found' ] ]
end