bugfix: fixing clogged connection requests after a jumbo one

In an already initiated connection, when piping multiple requests to be
sent concurrently, a case happened where the first filled the write
buffer, leaving the second in the connection pending queue; the initial
request would finish without ever taking the subsequent request from the
pending queue, leaving the connection hanging.

this was fixed by making flushing the queue part of the #consume work.
This commit is contained in:
HoneyryderChuck 2021-06-02 16:51:02 +01:00
parent a14fa26c7c
commit 06f1a041e6

View File

@ -362,6 +362,8 @@ module HTTPX
write_drained = false
end unless interests == :r
send_pending if @state == :open
# return if socket is drained
next unless (interests != :r || read_drained) &&
(interests != :w || write_drained)