diff --git a/lib/puma/client.rb b/lib/puma/client.rb index 8a37736aaf..7b013732ab 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" @@ -349,7 +349,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"