From 68a9060d02b1eb35c12843c0f1653809b776b35b Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Wed, 20 Jan 2016 15:54:20 +1030 Subject: Using a hacked faye-websocket, drop EventMachine --- actioncable/lib/action_cable/process/logging.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'actioncable/lib/action_cable/process/logging.rb') diff --git a/actioncable/lib/action_cable/process/logging.rb b/actioncable/lib/action_cable/process/logging.rb index dce637b3ca..ebb8990891 100644 --- a/actioncable/lib/action_cable/process/logging.rb +++ b/actioncable/lib/action_cable/process/logging.rb @@ -1,7 +1,8 @@ require 'action_cable/server' -require 'eventmachine' -EM.error_handler do |e| - puts "Error raised inside the event loop: #{e.message}" - puts e.backtrace.join("\n") +if defined?(::EventMachine) + EventMachine.error_handler do |e| + puts "Error raised inside the event loop: #{e.message}" + puts e.backtrace.join("\n") + end end -- cgit v1.2.3 From 503fe757c7f5f917deab95acdcd421a1dede05c7 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Fri, 22 Jan 2016 04:14:03 +1030 Subject: Ditch the EM error logging helper We're no longer doing our work in the EM event loop, so errors are quite unlikely, and if they do occur, they're not really our responsibility to handle. --- actioncable/lib/action_cable/process/logging.rb | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 actioncable/lib/action_cable/process/logging.rb (limited to 'actioncable/lib/action_cable/process/logging.rb') diff --git a/actioncable/lib/action_cable/process/logging.rb b/actioncable/lib/action_cable/process/logging.rb deleted file mode 100644 index ebb8990891..0000000000 --- a/actioncable/lib/action_cable/process/logging.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'action_cable/server' - -if defined?(::EventMachine) - EventMachine.error_handler do |e| - puts "Error raised inside the event loop: #{e.message}" - puts e.backtrace.join("\n") - end -end -- cgit v1.2.3