mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-03-24 18:28:49 +00:00
Fix for #251
This commit is contained in:
parent
b91ad6fcdd
commit
a0f6677964
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -179,11 +180,20 @@ namespace Artemis.Modules.Effects.WindowsProfile
|
|||||||
var tryCount = 0;
|
var tryCount = 0;
|
||||||
while (tryCount <= 10)
|
while (tryCount <= 10)
|
||||||
{
|
{
|
||||||
tryCount++;
|
// Causes WebException if not internet connection is available
|
||||||
var connected = _spotify.Connect();
|
try
|
||||||
if (connected)
|
{
|
||||||
|
tryCount++;
|
||||||
|
var connected = _spotify.Connect();
|
||||||
|
if (connected)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
catch (WebException)
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
Thread.Sleep(1000);
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
_spotifySetupBusy = false;
|
_spotifySetupBusy = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -46,7 +46,6 @@ namespace Artemis.Utilities
|
|||||||
{
|
{
|
||||||
// These exceptions should only really occur when running from VS
|
// These exceptions should only really occur when running from VS
|
||||||
Logger.Error(e, "Update check failed");
|
Logger.Error(e, "Update check failed");
|
||||||
mgr.Result.Dispose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user