UpdateManager no longer silently shuts down after failure

This commit is contained in:
Lucas Nicodemus 2015-02-21 18:46:12 -07:00
parent deb4113c73
commit bd066589b8

View file

@ -32,7 +32,7 @@ namespace TShockAPI
/// <summary>
/// Check once every X minutes.
/// </summary>
private readonly int CheckXMinutes = 30;
private int CheckXMinutes = 30;
public UpdateManager()
{
@ -44,11 +44,12 @@ namespace TShockAPI
try
{
UpdateCheck(state);
CheckXMinutes = 30;
}
catch (Exception)
{
//swallow the exception
return;
// Skip this run and check more frequently...
CheckXMinutes = 5;
}
Thread.Sleep(CheckXMinutes * 60 * 1000);