about summary refs log tree commit homepage
path: root/lib/rainbows/revactor.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-12-16 23:57:08 -0800
committerEric Wong <normalperson@yhbt.net>2009-12-16 23:57:08 -0800
commit5dea67ecf3dd868e7b375312cdef2c4651b11437 (patch)
tree106856f38f3e4b8934af0a584345ea09644b4b5e /lib/rainbows/revactor.rb
parent52ad3f270e758e5bfdfe965cbecbd20d5048062f (diff)
downloadrainbows-5dea67ecf3dd868e7b375312cdef2c4651b11437.tar.gz
Diffstat (limited to 'lib/rainbows/revactor.rb')
-rw-r--r--lib/rainbows/revactor.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb
index ff0e429..b410bda 100644
--- a/lib/rainbows/revactor.rb
+++ b/lib/rainbows/revactor.rb
@@ -68,7 +68,7 @@ module Rainbows
       end while alive and hp.reset.nil? and env.clear
     rescue ::Revactor::TCP::ReadError
     rescue => e
-      handle_error(client, e)
+      Error.write(client.instance_eval { @_io }, e)
     ensure
       client.close
     end
@@ -121,17 +121,6 @@ module Rainbows
       rescue Errno::EMFILE => e
     end
 
-    # if we get any error, try to write something back to the client
-    # assuming we haven't closed the socket, but don't get hung up
-    # if the socket is already closed or broken.  We'll always ensure
-    # the socket is closed at the end of this function
-    def handle_error(client, e)
-      # this is Revactor implementation dependent
-      msg = Error.response(e) and
-        client.instance_eval { @_io.write_nonblock(msg) }
-      rescue
-    end
-
     def revactorize_listeners
       LISTENERS.map do |s|
         case s