Merge branch 'pcriv-master-patch-67803' into 'master'

Allow retry_after to be a Float

See merge request honeyryderchuck/httpx!194
This commit is contained in:
HoneyryderChuck 2022-02-14 17:37:08 +00:00
commit f508fc32c9

View File

@ -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