Skip to content

Commit

Permalink
Added another check for cancellation.
Browse files Browse the repository at this point in the history
  • Loading branch information
LegacyNsfw committed Dec 10, 2018
1 parent d50eb9a commit c6a2f9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,5 @@
LocalOnly/

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

Expand Down
5 changes: 5 additions & 0 deletions Apps/PcmLibrary/Vehicle.FullRead.cs
Expand Up @@ -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());
Expand Down

0 comments on commit c6a2f9a

Please sign in to comment.