diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-02-27 17:58:16 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-02-27 17:58:16 -0800 |
commit | 84c03d4019493edcd1c59e2816fbea08f3375c92 (patch) | |
tree | 06f11ac8000bc7a84eff13835994c2cfc0a04356 /lib | |
parent | 1e34a4f02e8f3743cf4d27117ccaf083a83b4d1f (diff) | |
download | rainbows-84c03d4019493edcd1c59e2816fbea08f3375c92.tar.gz |
Since we deal with untrusted/non-local clients, those clients may disconnect at inopportune times and leave us with ENOTCONN when we try to call getpeername(2)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rainbows/error.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/error.rb b/lib/rainbows/error.rb index e67d2e4..d90dad0 100644 --- a/lib/rainbows/error.rb +++ b/lib/rainbows/error.rb @@ -28,7 +28,8 @@ 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, Errno::ENOTCONN # 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 |