From 5dea67ecf3dd868e7b375312cdef2c4651b11437 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 16 Dec 2009 23:57:08 -0800 Subject: cleanup: consolidate write_nonblock error handling --- lib/rainbows/base.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/rainbows/base.rb') diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index a735b82..9bbe049 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -10,11 +10,6 @@ module Rainbows include Rainbows::Const G = Rainbows::G - def handle_error(client, e) - msg = Error.response(e) and client.write_nonblock(msg) - rescue - end - def init_worker_process(worker) super(worker) G.tmp = worker.tmp @@ -65,7 +60,7 @@ module Rainbows # if the socket is already closed or broken. We'll always ensure # the socket is closed at the end of this function rescue => e - handle_error(client, e) + Error.write(client, e) ensure client.close end -- cgit v1.2.3-24-ge0c7