Commit 34d52351 authored by Bailey Berro's avatar Bailey Berro Committed by Commit Bot

Do not start discover timer if there are no valid interfaces

Previously, if there were no valid NetworkInterfaces we would exit out of
NetBios discovery, but the discovery timer would still be set causing a
moved-from callback to be run twice.

The crash was especially subtle becuase it required having no valid
network interfaces, which is uncommon because both Wifi and Ethernet are
valid interfaces.

Bug: chromium:882972
Test: verified manually on Elm device
Change-Id: I2e7a28aded718845a08669f464b60bba2bbc6174
Reviewed-on: https://chromium-review.googlesource.com/1226364
Commit-Queue: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591433}
parent c30e6d05
......@@ -75,6 +75,7 @@ void NetBiosHostLocator::FindHosts(FindHostsCallback callback) {
// no valid interfaces.
running_ = false;
std::move(callback_).Run(false /* success */, results_);
return;
}
timer_->Start(FROM_HERE,
......
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