From 1029c49c32cf3b8c7a013753783ab37f364ad65d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 21 Jun 2015 21:45:37 +0200 Subject: [PATCH] Remove anemic indirection --- lib/action_cable/connection/base.rb | 5 ----- lib/action_cable/connection/internal_channel.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb index d96216edc2..ffef85ead2 100644 --- a/lib/action_cable/connection/base.rb +++ b/lib/action_cable/connection/base.rb @@ -81,11 +81,6 @@ module ActionCable @websocket.send data end - - def handle_exception - close - end - def close logger.error "Closing connection" @websocket.close diff --git a/lib/action_cable/connection/internal_channel.rb b/lib/action_cable/connection/internal_channel.rb index 55dfc72777..885457d8c2 100644 --- a/lib/action_cable/connection/internal_channel.rb +++ b/lib/action_cable/connection/internal_channel.rb @@ -37,7 +37,7 @@ module ActionCable logger.error "There was an exception - #{e.class}(#{e.message})" logger.error e.backtrace.join("\n") - handle_exception + close end end end