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
 
--
unsubscribe: yahns-public+unsubscr...@yhbt.net
archive: https://yhbt.net/yahns-public/

Reply via email to