From 1a9a718a3f9a5b582a4a339a9bb9249c2ca392d7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 6 Nov 2009 19:45:17 -0800 Subject: cleanup worker heartbeat and master deathwatch It turns out neither the EventMachine and Rev classes checked for master death in its heartbeat mechanism. Since we managed to forget the same thing twice, we now have a test case for it and also centralized the code to remove duplication. --- lib/rainbows/ev_core.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/ev_core.rb') diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb index 2679b5a..244e726 100644 --- a/lib/rainbows/ev_core.rb +++ b/lib/rainbows/ev_core.rb @@ -28,8 +28,8 @@ module Rainbows when HttpParserError # try to tell the client they're bad ERROR_400_RESPONSE else - G.logger.error "Read error: #{e.inspect}" - G.logger.error e.backtrace.join("\n") + G.server.logger.error "Read error: #{e.inspect}" + G.server.logger.error e.backtrace.join("\n") ERROR_500_RESPONSE end write(msg) -- cgit v1.2.3-24-ge0c7