//For the change to Merkle Hash, we need to return the final Merkle Hash\r
var hash = FileState.NullSafe(f => f.Checksum);\r
\r
- Debug.Assert(FileState==null || hash != null,"FileState without a checksum encountered");\r
+ // Debug.Assert(FileState==null || hash != null,"FileState without a checksum encountered");\r
\r
//var hash = FileState.NullSafe(f => f.ETag);\r
\r
throw new RetryException("Failed too many times");\r
\r
//Wait for service unavailable\r
- if (result.StatusCode == HttpStatusCode.ServiceUnavailable)\r
+ if (result.StatusCode == HttpStatusCode.ServiceUnavailable || result.StatusCode==HttpStatusCode.BadGateway)\r
{\r
\r
Log.WarnFormat("[UNAVAILABLE] Waiting before retrying [{0}]:[{1}] due to [{2}]",message.Method, message.RequestUri,result.ReasonPhrase); \r