Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initialization of Expires in WP Request #302

Merged
merged 1 commit into from
May 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ private bool CheckValidNanoFrameworkSerialDevice(NanoDevice<NanoSerialDevice> de
}
}
}
catch
catch (Exception /* ex */) // we could eat simple programming errors here - like a bad cast or other problem when changing code
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your comment is correct, of course!
This was (is) here because of the bad things always happening when we where using the UWP APIs.
Probably needs to be revisited now that we aren't using that anymore.

I'm no big fan of "catch all" like this one, but sometimes that's the way to go...

{
// "catch all" required because the device open & check calls might fail for a number of reasons
// if there is a deviceID, remove it from cache, just in case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ internal WireProtocolRequest AsyncRequest(OutgoingMessage message, int timeout)

#region Commands implementation

private List<Commands.Monitor_MemoryMap.Range> GetMemoryMap()
public List<Commands.Monitor_MemoryMap.Range> GetMemoryMap()
{
Commands.Monitor_MemoryMap cmd = new Commands.Monitor_MemoryMap();

Expand Down Expand Up @@ -1461,7 +1461,7 @@ public TargetInfo GetMonitorTargetInfo()
return null;
}

private List<Commands.Monitor_FlashSectorMap.FlashSectorData> GetFlashSectorMap()
public List<Commands.Monitor_FlashSectorMap.FlashSectorData> GetFlashSectorMap()
{
IncomingMessage reply = PerformSyncRequest(Commands.c_Monitor_FlashSectorMap, 0, null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class WireProtocolRequest
public CancellationToken CancellationToken { get; }
public TaskCompletionSource<IncomingMessage> TaskCompletionSource { get; }

public DateTimeOffset Expires { get; private set; } = DateTime.MaxValue;
public DateTimeOffset Expires { get; private set; } = DateTimeOffset.MaxValue;

public DateTime RequestTimestamp { get; private set; }

Expand Down