diff --git a/PogoLocationFeeder/Program.cs b/PogoLocationFeeder/Program.cs index 43e20fe..d04edce 100644 --- a/PogoLocationFeeder/Program.cs +++ b/PogoLocationFeeder/Program.cs @@ -163,13 +163,11 @@ public async void Start() { try { - Thread.Sleep(30 * 1000); pollDiscordFeed(discordWebReader.stream); } catch (WebException e) { Log.Warn($"Experiencing connection issues. Throttling..."); - Thread.Sleep(30 * 1000); discordWebReader.InitializeWebClient(); } catch (Exception e) @@ -177,6 +175,10 @@ public async void Start() Log.Warn($"Unknown exception", e); break; } + finally + { + Thread.Sleep(20 * 1000); + } } Console.ReadKey(true); @@ -206,12 +208,11 @@ private static IEnumerable ReadLines(StreamReader stream) private void pollDiscordFeed(Stream stream) { - int delay = 30 * 1000; + int delay = 10 * 1000; var cancellationTokenSource = new CancellationTokenSource(); var token = cancellationTokenSource.Token; Task.Factory.StartNew(async () => { - Thread.Sleep(5 * 1000); while (true) { for (int retrys = 0; retrys <= 3; retrys++)