diff options
author | Eric Wong <e@80x24.org> | 2015-04-24 11:07:40 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-04-24 11:07:40 +0000 |
commit | 9e3217b0522315d2d115e53309f3563e9554ffc9 (patch) | |
tree | fcb3031993cebf408cbdc48edbcbd066faa592c2 /lib | |
parent | d77a63a565caf99b842b434e9afb3f220a7c60ff (diff) | |
download | yahns-9e3217b0522315d2d115e53309f3563e9554ffc9.tar.gz |
Bad connections or dead upstreams cannot be solved looking at a backtrace, so avoid polluting logs with them and making other problems less visible.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/yahns/proxy_pass.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/yahns/proxy_pass.rb b/lib/yahns/proxy_pass.rb index e86e9c9..7083104 100644 --- a/lib/yahns/proxy_pass.rb +++ b/lib/yahns/proxy_pass.rb @@ -72,6 +72,9 @@ class Yahns::ProxyPass # :nodoc: send_req_buf(req) end rescue => e + # avoid polluting logs with a giant backtrace when the problem isn't + # fixable in code. + e.set_backtrace([]) if Errno::ECONNREFUSED === e c.proxy_err_response(502, self, e, nil) end |