about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-17 22:42:55 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-17 22:42:55 -0700
commitce5bb179bcd0ac2921da636375cb3821b79c428c (patch)
tree75c65049ddbfab821def99d6a7aa7e1604eb58bb
parentd838e5ef01471eb12aec42639246946f7b3da4a5 (diff)
downloadrainbows-ce5bb179bcd0ac2921da636375cb3821b79c428c.tar.gz
on_write_complete has no chance of being called
there so remove the unnecessary ensure statement
-rw-r--r--lib/rainbows/rev.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rainbows/rev.rb b/lib/rainbows/rev.rb
index 8381975..7e5ca27 100644
--- a/lib/rainbows/rev.rb
+++ b/lib/rainbows/rev.rb
@@ -55,6 +55,7 @@ module Rainbows
       end
 
       def handle_error(e)
+        @state = :close
         msg = case e
         when EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::EINVAL,Errno::EBADF
           ERROR_500_RESPONSE
@@ -66,8 +67,6 @@ module Rainbows
           ERROR_500_RESPONSE
         end
         write(msg)
-        ensure
-          @state = :close
       end
 
       def app_call