Index: Src/GoogleApis/Apis/Http/BackOffHandler.cs
===================================================================
--- a/Src/GoogleApis/Apis/Http/BackOffHandler.cs
+++ b/Src/GoogleApis/Apis/Http/BackOffHandler.cs
@@ -40,7 +40,7 @@
///
/// Gets or sets the maximum time span to wait. If the back-off instance returns a greater time span then
/// this value, this handler returns false to both and
- /// . Default value is 2 minutes per a retry request.
+ /// . Default value is 5 seconds per a retry request.
///
public TimeSpan MaxTimeSpan { get; set; }
@@ -56,9 +56,9 @@
///
public Func HandleExceptionFunc { get; set; }
- /// Default function which handles server errors (5xx).
+ /// Default function which handles server errors (503).
public static readonly Func DefaultHandleUnsuccessfulResponseFunc =
- (r) => (int)r.StatusCode / 100 == 5;
+ (r) => (int)r.StatusCode == 503;
///
/// Default function which handles exception which aren't
@@ -75,7 +75,7 @@
BackOff = backOff;
HandleExceptionFunc = DefaultHandleExceptionFunc;
HandleUnsuccessfulResponseFunc = DefaultHandleUnsuccessfulResponseFunc;
- MaxTimeSpan = TimeSpan.FromMinutes(2);
+ MaxTimeSpan = TimeSpan.FromSeconds(5);
}
}
@@ -84,7 +84,7 @@
///
/// Gets the maximum time span to wait. If the back-off instance returns a greater time span, the handle method
- /// returns false. Default value is 2 minutes per a retry request.
+ /// returns false. Default value is 5 seconds per a retry request.
///
public TimeSpan MaxTimeSpan { get; private set; }