mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-06-05 17:14:23 -04:00
Expect null result in WaitAndRetry logic in http retry handler
Fixes #447
This commit is contained in:
parent
8bc5b547ef
commit
4c64977b71
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ namespace DiscordChatExporter.Domain.Internal
|
|||
(i, result, ctx) =>
|
||||
{
|
||||
// If rate-limited, use retry-after as a guide
|
||||
if (result.Result.StatusCode == HttpStatusCode.TooManyRequests)
|
||||
if (result.Result?.StatusCode == HttpStatusCode.TooManyRequests)
|
||||
{
|
||||
// Only start respecting retry-after after a few attempts.
|
||||
// The reason is that Discord often sends unreasonable (20+ minutes) retry-after
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue