Commit 91adc1ac authored by Patrick Monette's avatar Patrick Monette Committed by Commit Bot

ModuleInspector: Don't restart inspection if the queue is empty.

StartInspectingModule() was being called regardless of the state of the
queue in the event of a connection error with the UtilWin service.

This was wrong because the connection error can happen even if the
ModuleInspector is idle.

Bug: 1100982
Change-Id: I715a9014e54e143d37ed94a07925fd70d3caf456
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422259Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809384}
parent 34538a96
......@@ -217,9 +217,9 @@ void ModuleInspector::OnUtilWinServiceConnectionError() {
// Disconnect from the service.
remote_util_win_.reset();
// Restart inspection for the current module, only if the retry limit wasn't
// Restart the inspection if there is work to do and the retry limit wasn't
// reached.
if (connection_error_retry_count_--)
if (!queue_.empty() && connection_error_retry_count_--)
StartInspectingModule();
}
......
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