UpdateManager no longer silently shuts down after failure
This commit is contained in:
parent
deb4113c73
commit
bd066589b8
1 changed files with 4 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ namespace TShockAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check once every X minutes.
|
/// Check once every X minutes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly int CheckXMinutes = 30;
|
private int CheckXMinutes = 30;
|
||||||
|
|
||||||
public UpdateManager()
|
public UpdateManager()
|
||||||
{
|
{
|
||||||
|
|
@ -44,11 +44,12 @@ namespace TShockAPI
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
UpdateCheck(state);
|
UpdateCheck(state);
|
||||||
|
CheckXMinutes = 30;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
//swallow the exception
|
// Skip this run and check more frequently...
|
||||||
return;
|
CheckXMinutes = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
Thread.Sleep(CheckXMinutes * 60 * 1000);
|
Thread.Sleep(CheckXMinutes * 60 * 1000);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue