From f5a8e60d4338fd88b6761c93bff17999eb222fbc Mon Sep 17 00:00:00 2001 From: Pablo Crivella Date: Mon, 14 Feb 2022 12:56:14 +0000 Subject: [PATCH] Allow retry_after to be a Float --- lib/httpx/plugins/retries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httpx/plugins/retries.rb b/lib/httpx/plugins/retries.rb index ced28f65..456bb773 100644 --- a/lib/httpx/plugins/retries.rb +++ b/lib/httpx/plugins/retries.rb @@ -41,7 +41,7 @@ module HTTPX def option_retry_after(value) # return early if callable unless value.respond_to?(:call) - value = Integer(value) + value = Float(value) raise TypeError, ":retry_after must be positive" unless value.positive? end