Skip to content

Commit

Permalink
Add attempts parameter to ConnectAsync (#280)
Browse files Browse the repository at this point in the history
***UPDATE_DESCENDENTS***
  • Loading branch information
josesimoes authored Nov 27, 2020
1 parent c4c21d0 commit c8abd72
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!-- need this here to rebuild the packages.lock.json file in case the hashes fail to validate -->
<!-- <DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder> -->
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -81,6 +83,9 @@
<PackageReference Include="Polly">
<Version>7.2.1</Version>
</PackageReference>
<PackageReference Include="Polly.Contrib.WaitAndRetry">
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version>
</PackageReference>
Expand Down
6 changes: 6 additions & 0 deletions nanoFramework.Tools.DebugLibrary.Net/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
"resolved": "7.2.1",
"contentHash": "Od8SnPlpQr+PuAS0YzY3jgtzaDNknlIuAaldN2VEIyTvm/wCg22C5nUkUV1BEG8rIsub5RFMoV/NEQ0tM/+7Uw=="
},
"Polly.Contrib.WaitAndRetry": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA=="
},
"PropertyChanged.Fody": {
"type": "Direct",
"requested": "[2.6.1, )",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,11 @@ public async Task<bool> ConnectToNanoBooterAsync(CancellationToken cancellationT
CreateDebugEngine();
}

if (fConnected = await DebugEngine.ConnectAsync(1000, true, ConnectionSource.Unknown))
if (fConnected = await DebugEngine.ConnectAsync(
1000,
true,
3,
ConnectionSource.Unknown))
{
Commands.Monitor_Ping.Reply reply = DebugEngine.GetConnectionSource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ private async Task<bool> CheckValidNanoFrameworkSerialDeviceAsync(NanoDevice<Nan
if (await device.DebugEngine.ConnectAsync(
200,
false,
1,
ConnectionSource.Unknown,
false))
{
Expand Down
263 changes: 140 additions & 123 deletions nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!-- need this here to rebuild the packages.lock.json file in case the hashes fail to validate -->
<!-- <DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder> -->
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -158,7 +160,7 @@
</ItemGroup>
<Import Project="..\nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
<VisualStudioVersion>15.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
8 changes: 7 additions & 1 deletion nanoFramework.Tools.DebugLibrary.UWP/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"resolved": "7.2.1",
"contentHash": "Od8SnPlpQr+PuAS0YzY3jgtzaDNknlIuAaldN2VEIyTvm/wCg22C5nUkUV1BEG8rIsub5RFMoV/NEQ0tM/+7Uw=="
},
"Polly.Contrib.WaitAndRetry": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA=="
},
"PropertyChanged.Fody": {
"type": "Direct",
"requested": "[2.6.1, )",
Expand Down Expand Up @@ -85,7 +91,7 @@
"NETStandard.Library": {
"type": "Transitive",
"resolved": "2.0.3",
"contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
"contentHash": "548M6mnBSJWxsIlkQHfbzoYxpiYFXZZSL00p4GHYv8PkiqFBnnT68mW5mGEsA/ch9fDO9GkPgkFQpWiXZN7mAQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0"
}
Expand Down

0 comments on commit c8abd72

Please sign in to comment.