Commit a3e1e654 authored by charliea's avatar charliea Committed by Commit bot

Fix logic for retrying BattOr initialization after a timeout

Unfortunately, due to the way this code relies on posting a delayed
tasks that gets run at a later time, writing a unit test is very
difficult.

BUG=678659

Review-Url: https://codereview.chromium.org/2618693003
Cr-Commit-Position: refs/heads/master@{#441770}
parent 6381bd4e
......@@ -545,7 +545,6 @@ void BattOrAgent::OnActionTimeout() {
} else {
CompleteCommand(BATTOR_ERROR_TOO_MANY_INIT_RETRIES);
}
return;
// TODO(crbug.com/672631): There's currently a BattOr firmware bug that's
......@@ -563,12 +562,12 @@ void BattOrAgent::OnActionTimeout() {
} else {
CompleteCommand(BATTOR_ERROR_TOO_MANY_START_TRACING_RETRIES);
}
return;
default:
CompleteCommand(BATTOR_ERROR_TIMEOUT);
timeout_callback_.Cancel();
}
timeout_callback_.Cancel();
}
void BattOrAgent::SendControlMessage(BattOrControlMessageType type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment