You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

RetryMode.cs 960 B

12345678910111213141516171819202122
  1. using System;
  2. namespace Discord
  3. {
  4. /// <summary> Specifies how a request should act in the case of an error. </summary>
  5. [Flags]
  6. public enum RetryMode
  7. {
  8. /// <summary> If a request fails, an exception is thrown immediately. </summary>
  9. AlwaysFail = 0x0,
  10. /// <summary> Retry if a request timed out. </summary>
  11. RetryTimeouts = 0x1,
  12. // /// <summary> Retry if a request failed due to a network error. </summary>
  13. //RetryErrors = 0x2,
  14. /// <summary> Retry if a request failed due to a ratelimit. </summary>
  15. RetryRatelimit = 0x4,
  16. /// <summary> Retry if a request failed due to an HTTP error 502. </summary>
  17. Retry502 = 0x8,
  18. /// <summary> Continuously retry a request until it times out, its cancel token is triggered, or the server responds with a non-502 error. </summary>
  19. AlwaysRetry = RetryTimeouts | /*RetryErrors |*/ RetryRatelimit | Retry502,
  20. }
  21. }