Fix RetryHandler.cs for PTC Login to allow HttpStatusCode 302

FeroxRev [2016-07-19 20:13:16]
Fix RetryHandler.cs for PTC Login to allow HttpStatusCode 302
Filename
PokemonGo/RocketAPI/Helpers/RetryHandler.cs
diff --git a/PokemonGo/RocketAPI/Helpers/RetryHandler.cs b/PokemonGo/RocketAPI/Helpers/RetryHandler.cs
index f8f4113..4970142 100644
--- a/PokemonGo/RocketAPI/Helpers/RetryHandler.cs
+++ b/PokemonGo/RocketAPI/Helpers/RetryHandler.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Net;
 using System.Net.Http;
 using System.Text;
 using System.Threading;
@@ -25,7 +26,9 @@ namespace PokemonGo.RocketAPI.Helpers
                 try
                 {
                     var response = await base.SendAsync(request, cancellationToken);
-                    response.EnsureSuccessStatusCode();
+                    if (response.StatusCode == HttpStatusCode.BadGateway)
+                        throw new Exception(); //todo: proper implementation
+
                     return response;
                 }
                 catch (Exception ex)
You may download the files in Public Git.