mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
do not leave the read loop after the epiped event, unless we're out of requests to process or can't read from socket
This commit is contained in:
parent
3b2d822af9
commit
952ae7c1ef
@ -293,13 +293,14 @@ module HTTPX
|
||||
# socket has been drained. mark and exit the read loop.
|
||||
if siz.zero?
|
||||
read_drained = @read_buffer.empty?
|
||||
epiped = false
|
||||
break
|
||||
end
|
||||
|
||||
parser << @read_buffer.to_s
|
||||
|
||||
# continue reading if possible.
|
||||
break if interests == :w
|
||||
break if interests == :w && !epiped
|
||||
|
||||
# exit the read loop if connection is preparing to be closed
|
||||
break if @state == :closing || @state == :closed
|
||||
|
Loading…
x
Reference in New Issue
Block a user