diff --git a/plugins/twitch/twitch-helpers.cpp b/plugins/twitch/twitch-helpers.cpp index 9fa241e1..496fc5be 100644 --- a/plugins/twitch/twitch-helpers.cpp +++ b/plugins/twitch/twitch-helpers.cpp @@ -144,9 +144,14 @@ static void handleThrottling(const httplib::Result &response) return; } - blog(LOG_WARNING, "Twitch API access is throttled for %lld seconds!", + if (sleepDuration < std::chrono::seconds(1)) { + sleepDuration = std::chrono::seconds(1); + } + + blog(LOG_WARNING, + "Twitch API access is throttled for %lld milliseconds!", static_cast( - std::chrono::duration_cast( + std::chrono::duration_cast( sleepDuration) .count())); apiIsThrottling = true;