diff options
Diffstat (limited to 'lib/http/http.ml')
| -rw-r--r-- | lib/http/http.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/http/http.ml b/lib/http/http.ml index e1b2998..5288aac 100644 --- a/lib/http/http.ml +++ b/lib/http/http.ml @@ -64,7 +64,10 @@ module Base = struct | _ -> raise Invalid_Method)
>>= process_response path
in if limit.remaining > 0 then process ()
- else Clock.at (Core.Time.(Span.of_int_sec limit.reset |> of_span_since_epoch)) >>= process
+ else
+ 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
let get_gateway () =
|