Skip to content

Commit

Permalink
JsDbg.WinDbg: Perform multiple retries when waiting for the debugger …
Browse files Browse the repository at this point in the history
…to be broken in.
  • Loading branch information
sanketj committed Feb 4, 2019
1 parent 269a3d0 commit d5b3f1e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions server/JsDbg.WinDbg/DebuggerRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,11 @@ public async Task Run() {
}

public async Task<T> AttemptOperation<T>(Func<T> operation, string errorMessage) {
bool retryAfterWaitingForBreak = false;
do {
try {
return operation();
} catch (InvalidOperationException) {
if (!retryAfterWaitingForBreak) {
retryAfterWaitingForBreak = true;
} else {
throw new DebuggerException(errorMessage);
}
// retry after waiting for break-in
} catch (DebuggerException) {
throw;
} catch {
Expand Down

0 comments on commit d5b3f1e

Please sign in to comment.