diff options
| author | Matias Goldfeld <[email protected]> | 2021-01-29 13:41:00 -0500 |
|---|---|---|
| committer | Matias Goldfeld <[email protected]> | 2021-01-29 13:41:00 -0500 |
| commit | 1d7fc27e505ff0eb9db3449404a2d4383a64673a (patch) | |
| tree | a8d1751e035bedfea9edb1e1b838e4a6f381a140 /lib/http/http.ml | |
| parent | Revert "More Int64 refactors" (diff) | |
| download | disml-1d7fc27e505ff0eb9db3449404a2d4383a64673a.tar.xz disml-1d7fc27e505ff0eb9db3449404a2d4383a64673a.zip | |
Revert "More 32 bit fixes"
This reverts commit 4a95a2a16273384072a767ff44e5db772224d6a4.
Diffstat (limited to 'lib/http/http.ml')
| -rw-r--r-- | lib/http/http.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http/http.ml b/lib/http/http.ml index afb2610..ec6cb2c 100644 --- a/lib/http/http.ml +++ b/lib/http/http.ml @@ -68,9 +68,9 @@ module Base = struct | `Post -> Cohttp_async.Client.post ~headers ~body uri
| `Put -> Cohttp_async.Client.put ~headers ~body uri)
>>= process_response path
- in if Int64.(limit.remaining > 0L) then process ()
+ in if limit.remaining > 0 then process ()
else
- let time = Time.(limit.reset |> Int63.of_int64_trunc |> Span.of_int63_seconds |> of_span_since_epoch) in
+ let time = Time.(Span.of_int_sec limit.reset |> of_span_since_epoch) in
Logs.debug (fun m -> m "Rate-limiting [Route: %s] [Duration: %d ms]" path Time.(diff time (Time.now ()) |> Span.to_ms |> Float.to_int) );
Clock.at time >>= process
end
|