skip pipelining if the client isn't pipelining

This commit is contained in:
HoneyryderChuck 2021-03-26 23:49:19 +00:00
parent 3c2abce23a
commit 1ef0371ef0

View File

@ -235,6 +235,8 @@ module HTTPX
def disable_pipelining
return if @requests.empty?
# do not disable pipelining if already set to 1 request at a time
return if @max_concurrent_requests == 1
@requests.each do |r|
r.transition(:idle)