Revision b5061ac8 trunk/Pithos.Network/TimeoutRetryCondition.cs

b/trunk/Pithos.Network/TimeoutRetryCondition.cs
13 13
        {
14 14
            get
15 15
            {
16
                return r => 
17
                    (r.Exception != null && r.Exception is WebException 
18
                    && (((WebException)r.Exception).Status == WebExceptionStatus.Timeout));
16
                return r =>
17
                           {
18
                               var responseStatus = r.ResponseHttpStatusCode;
19
                               if (r.Exception == null)
20
                                   return false;
21
                               if (!(r.Exception is WebException))
22
                                   return false;
23
                               var exceptionStatus = ((WebException) r.Exception).Status;
24
                               return (r.Exception != null
25
                                       && (exceptionStatus == WebExceptionStatus.Timeout));
26
                           };
19 27
            }
20 28
        }
21 29
    }

Also available in: Unified diff