Skip to content

Commit

Permalink
Merge pull request #10 from jjw24/fix_connection_check
Browse files Browse the repository at this point in the history
Fix connection check
  • Loading branch information
jjw24 authored Jun 18, 2021
2 parents 782fa0f + 5f640db commit 340ee85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Droplex/Downloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public static async Task<bool> CheckGoogleConnection()
{
var cts = new CancellationTokenSource();
cts.CancelAfter(2000);
await client.GetAsync("http://clients3.google.com/generate_204", cts.Token);

// this needs to finish first as it determines the url
client.GetAsync("http://clients3.google.com/generate_204", cts.Token).Wait();

return true;
}
Expand Down
8 changes: 4 additions & 4 deletions Droplex/Droplex.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
Expand All @@ -10,9 +10,9 @@
</PropertyGroup>

<PropertyGroup>
<PackageVersion>1.3.0</PackageVersion>
<AssemblyVersion>1.3.0</AssemblyVersion>
<InformationalVersion>1.3.0</InformationalVersion>
<PackageVersion>1.3.1</PackageVersion>
<AssemblyVersion>1.3.1</AssemblyVersion>
<InformationalVersion>1.3.1</InformationalVersion>
<PackageId>Droplex</PackageId>
<Authors>Jeremy Wu</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down

0 comments on commit 340ee85

Please sign in to comment.