skip reads if no interests, or no io whatsoever

This commit is contained in:
HoneyryderChuck 2021-05-31 13:56:16 +01:00
parent 2025491cda
commit bf8c265756

View File

@ -254,6 +254,8 @@ module HTTPX
end
def consume
return unless @io
catch(:called) do
epiped = false
loop do
@ -311,7 +313,7 @@ module HTTPX
# exit #consume altogether if all outstanding requests have been dealt with
return if @pending.size.zero? && @inflight.zero?
end unless (interests == :w || @state == :closing) && !epiped
end unless (interests.nil? || interests == :w || @state == :closing) && !epiped
#
# tight write loop.