From 5eff05fe6b620c9d1c6cb867db84df1743159492 Mon Sep 17 00:00:00 2001 From: schneems Date: Thu, 24 Sep 2020 16:13:20 -0500 Subject: [PATCH] [close #2371] Don't report EOFError --- lib/puma/client.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/puma/client.rb b/lib/puma/client.rb index 1b7c0ea018..d553bbd6a1 100644 --- a/lib/puma/client.rb +++ b/lib/puma/client.rb @@ -155,7 +155,9 @@ def try_to_finish data = @io.read_nonblock(CHUNK_SIZE) rescue IO::WaitReadable return false - rescue SystemCallError, IOError, EOFError + rescue EOFError + # Swallow it + rescue SystemCallError, IOError raise ConnectionError, "Connection error detected during read" end