mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2025-01-31 13:01:39 +01:00
More retry
This commit is contained in:
parent
68d86b7ac6
commit
8c39c9e475
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user