From d999d4ba9f5b9e82af6fd1777ef0c4daed977623 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Mon, 7 Sep 2020 21:31:35 -0500 Subject: [PATCH] Backport #2121 Co-authored-by: wjordan --- lib/puma/client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puma/client.rb b/lib/puma/client.rb index a6107cc94f..1e31d292c4 100644 --- a/lib/puma/client.rb +++ b/lib/puma/client.rb @@ -153,7 +153,7 @@ def try_to_finish begin data = @io.read_nonblock(CHUNK_SIZE) - rescue Errno::EAGAIN + rescue IO::WaitReadable return false rescue SystemCallError, IOError, EOFError raise ConnectionError, "Connection error detected during read" @@ -351,7 +351,7 @@ def read_body begin chunk = @io.read_nonblock(want) - rescue Errno::EAGAIN + rescue IO::WaitReadable return false rescue SystemCallError, IOError raise ConnectionError, "Connection error detected during read"