Permalink
Browse files

Added another check for cancellation.

  • Loading branch information...
LegacyNsfw committed Dec 10, 2018
1 parent d50eb9a commit c6a2f9a24a966aaa39ad1b9bee0c29e95bd208a6
Showing with 7 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +5 −0 Apps/PcmLibrary/Vehicle.FullRead.cs
@@ -1,3 +1,5 @@
LocalOnly/

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

@@ -136,6 +136,11 @@ private async Task<bool> TryReadBlock(byte[] image, int length, int startAddress

for(int sendAttempt = 1; sendAttempt <= MaxSendAttempts; sendAttempt++)
{
if (cancellationToken.IsCancellationRequested)
{
break;
}

Message message = this.messageFactory.CreateReadRequest(startAddress, length);

//this.logger.AddDebugMessage("Sending " + message.GetBytes().ToHex());

0 comments on commit c6a2f9a

Please sign in to comment.