about summary refs log tree commit homepage
path: root/lib/rainbows/error.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-12-04 01:29:48 -0800
committerEric Wong <normalperson@yhbt.net>2009-12-04 01:34:09 -0800
commit2783d3b69784231a36243c30a56aeefa6b39c181 (patch)
treea9400df710d5c51e16a111639d6158daed5c05d7 /lib/rainbows/error.rb
parent845143b4c9be43f4f52be297bdfdf6750e2239e5 (diff)
downloadrainbows-2783d3b69784231a36243c30a56aeefa6b39c181.tar.gz
A client disconnect could possibly trigger IOError on
close whereas EOFError does not occur.
Diffstat (limited to 'lib/rainbows/error.rb')
-rw-r--r--lib/rainbows/error.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/error.rb b/lib/rainbows/error.rb
index 89b1187..2d8cd94 100644
--- a/lib/rainbows/error.rb
+++ b/lib/rainbows/error.rb
@@ -19,10 +19,11 @@ module Rainbows
 
       def response(e)
         case e
-        when EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::EINVAL,Errno::EBADF
+        when EOFError, Errno::ECONNRESET,Errno::EPIPE,Errno::EINVAL,Errno::EBADF
           # swallow error if client shuts down one end or disconnects
         when Unicorn::HttpParserError
           Const::ERROR_400_RESPONSE # try to tell the client they're bad
+        when IOError # HttpParserError is an IOError
         else
           app(e)
           Const::ERROR_500_RESPONSE