mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-05 00:02:38 -04:00
request: do not buffer requests if buffer is full
This commit is contained in:
parent
fd25548ffd
commit
e779eaa8ba
@ -79,7 +79,7 @@ module HTTPX
|
||||
end
|
||||
|
||||
def send(request, **args)
|
||||
if @parser
|
||||
if @parser && !@write_buffer.full?
|
||||
parser.send(request, **args)
|
||||
else
|
||||
@pending << [request, args]
|
||||
@ -122,6 +122,7 @@ module HTTPX
|
||||
return if @io.closed?
|
||||
while (request, args = @pending.shift)
|
||||
parser.send(request, **args)
|
||||
break if @write_buffer.full?
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user