From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 933A220A1E for ; Sat, 8 Dec 2018 11:39:56 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH] http_client: do not warn on do_pread overreach Date: Sat, 8 Dec 2018 11:39:56 +0000 Message-Id: <20181208113956.29708-1-e@80x24.org> List-Id: Without sendfile, we can hit EOFError on IO#pread if a file we're serving gets truncated mid-response. This was causing test_truncated_sendfile failures; but I didn't notice before because I forgot to set SENDFILE_BROKEN=1 to disable the test. --- lib/yahns/http_client.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/yahns/http_client.rb b/lib/yahns/http_client.rb index d55a0db..8744053 100644 --- a/lib/yahns/http_client.rb +++ b/lib/yahns/http_client.rb @@ -332,7 +332,6 @@ def do_pread(io, count, offset) io.read(count, buf) end rescue EOFError - warn "BUG: do_pread overreach:\n #{caller.join("\n ")}\n" nil end