From c55771906df7d3bfbf8f986db4868d90693a54bf Mon Sep 17 00:00:00 2001 From: HoneyryderChuck Date: Sat, 6 Jan 2018 19:25:47 +0000 Subject: [PATCH] http/1: passing retries as well (not doing anything with them doh) --- lib/httpx/channel/http1.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/httpx/channel/http1.rb b/lib/httpx/channel/http1.rb index c53e774a..241cf640 100644 --- a/lib/httpx/channel/http1.rb +++ b/lib/httpx/channel/http1.rb @@ -12,6 +12,7 @@ module HTTPX def initialize(buffer, options) @options = Options.new(options) @max_concurrent_requests = @options.max_concurrent_requests + @retries = options.max_retries @parser = HTTP::Parser.new(self) @parser.header_value_type = :arrays @buffer = buffer @@ -34,7 +35,7 @@ module HTTPX @parser << data end - def send(request, **) + def send(request, retries: @retries, **) if @requests.size >= @max_concurrent_requests @pending << request return