Browse Source

Removed RetryMode.RetryErrors

tags/1.0-rc
RogueException 8 years ago
parent
commit
1169d3671c
2 changed files with 6 additions and 6 deletions
  1. +3
    -3
      src/Discord.Net.Core/RetryMode.cs
  2. +3
    -3
      src/Discord.Net.Rest/Net/Queue/RequestQueueBucket.cs

+ 3
- 3
src/Discord.Net.Core/RetryMode.cs View File

@@ -10,13 +10,13 @@ namespace Discord
AlwaysFail = 0x0,
/// <summary> Retry if a request timed out. </summary>
RetryTimeouts = 0x1,
/// <summary> Retry if a request failed due to a network error. </summary>
RetryErrors = 0x2,
// /// <summary> Retry if a request failed due to a network error. </summary>
//RetryErrors = 0x2,
/// <summary> Retry if a request failed due to a ratelimit. </summary>
RetryRatelimit = 0x4,
/// <summary> Retry if a request failed due to an HTTP error 502. </summary>
Retry502 = 0x8,
/// <summary> Continuously retry a request until it times out, its cancel token is triggered, or the server responds with a non-502 error. </summary>
AlwaysRetry = RetryTimeouts | RetryErrors | RetryRatelimit | Retry502,
AlwaysRetry = RetryTimeouts | /*RetryErrors |*/ RetryRatelimit | Retry502,
}
}

+ 3
- 3
src/Discord.Net.Rest/Net/Queue/RequestQueueBucket.cs View File

@@ -117,7 +117,7 @@ namespace Discord.Net.Queue
return response.Stream;
}
}
catch (HttpException) { throw; } //Pass through
//catch (HttpException) { throw; } //Pass through
catch (TimeoutException)
{
#if DEBUG_LIMITS
@@ -129,7 +129,7 @@ namespace Discord.Net.Queue
await Task.Delay(500);
continue; //Retry
}
catch (Exception)
/*catch (Exception)
{
#if DEBUG_LIMITS
Debug.WriteLine($"[{id}] Error");
@@ -139,7 +139,7 @@ namespace Discord.Net.Queue

await Task.Delay(500);
continue; //Retry
}
}*/
finally
{
UpdateRateLimit(id, request, info, lag, false);


Loading…
Cancel
Save