From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id AB4141FE43; Fri, 3 Jun 2016 01:58:51 +0000 (UTC) Date: Fri, 3 Jun 2016 01:58:51 +0000 From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH 3/2] proxy_pass: remove unnecessary rescue Message-ID: <20160603015851.GA30192@dcvr.yhbt.net> References: <20160603012837.19143-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160603012837.19143-1-e@80x24.org> List-Id: "proxy_response_start" caller is ReqRes#yahns_step which already does a global rescue. Furthermore, it clobbers backtraces on network errors which programmers can do nothing to fix. --- lib/yahns/proxy_http_response.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/yahns/proxy_http_response.rb b/lib/yahns/proxy_http_response.rb index 79b995a..2968062 100644 --- a/lib/yahns/proxy_http_response.rb +++ b/lib/yahns/proxy_http_response.rb @@ -220,8 +220,6 @@ def proxy_response_start(res, tip, kcar, req_res) # all done reading response from upstream, req_res will be discarded # when we return nil: proxy_busy_mod(wbuf, req_res) - rescue => e - proxy_err_response(502, req_res, e, wbuf) end def proxy_response_finish(kcar, wbuf, req_res)