More retry

This commit is contained in:
Nikolaj Olsson 2025-01-22 17:06:51 +01:00
parent 68d86b7ac6
commit 8c39c9e475

View File

@ -1179,6 +1179,12 @@ namespace Nikse.SubtitleEdit.Forms.Tts
result = httpClient.PostAsync(url, content, CancellationToken.None).Result;
}
if ((int)result.StatusCode == 429)
{
Task.Delay(2707).Wait();
result = httpClient.PostAsync(url, content, CancellationToken.None).Result;
}
var bytes = result.Content.ReadAsByteArrayAsync().Result;
if (!result.IsSuccessStatusCode)