diff options
Diffstat (limited to 'lib/yahns/proxy_pass.rb')
-rw-r--r-- | lib/yahns/proxy_pass.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/yahns/proxy_pass.rb b/lib/yahns/proxy_pass.rb index d02bb40..e86e9c9 100644 --- a/lib/yahns/proxy_pass.rb +++ b/lib/yahns/proxy_pass.rb @@ -139,6 +139,11 @@ class Yahns::ProxyPass # :nodoc: close_req_body(input) prepare_wait_readable end + rescue Errno::EPIPE, Errno::ECONNRESET, Errno::ENOTCONN + # no more reading off the client socket, just prepare to forward + # the rejection response from the upstream (if any) + @yahns_client.to_io.shutdown(Socket::SHUT_RD) + prepare_wait_readable end def prepare_wait_readable |