mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
skip reads if no interests, or no io whatsoever
This commit is contained in:
parent
2025491cda
commit
bf8c265756
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user