mirror of
https://github.com/ppy/osu
synced 2025-01-19 04:20:59 +00:00
Merge pull request #367 from EVAST9919/connection_fix
Fix client crash without internet connection
This commit is contained in:
commit
9e1a3b5d4e
@ -15,6 +15,7 @@ using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace osu.Desktop.Overlays
|
||||
{
|
||||
@ -115,7 +116,16 @@ namespace osu.Desktop.Overlays
|
||||
|
||||
private async void updateChecker()
|
||||
{
|
||||
updateManager = await UpdateManager.GitHubUpdateManager(@"https://github.com/ppy/osu", @"osulazer", null, null, true);
|
||||
try
|
||||
{
|
||||
updateManager = await UpdateManager.GitHubUpdateManager(@"https://github.com/ppy/osu", @"osulazer", null, null, true);
|
||||
}
|
||||
catch(HttpRequestException)
|
||||
{
|
||||
//check again every 30 minutes.
|
||||
Scheduler.AddDelayed(updateChecker, 60000 * 30);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!updateManager.IsInstalledApp)
|
||||
return;
|
||||
|
@ -137,6 +137,16 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -219,7 +229,6 @@
|
||||
<ItemGroup>
|
||||
<Content Include="lazer.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -5,6 +5,7 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste
|
||||
-->
|
||||
<packages>
|
||||
<package id="DeltaCompressionDotNet" version="1.0.0" targetFramework="net45" />
|
||||
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
|
||||
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net45" />
|
||||
<package id="Splat" version="1.6.2" targetFramework="net45" />
|
||||
<package id="squirrel.windows" version="1.5.2" targetFramework="net45" />
|
||||
|
Loading…
Reference in New Issue
Block a user