update_engine: Fix a p2p bug where the encstatful is full
This problem was introduced in crrev.com/c/2776259. When the
update_engine can't allocate the p2p file, it returns from the
StartDownloading() function and it doesn't start the transfer
anymore. So the update_engine will sit there idle not doing
anything. This only happens when the p2p is enabled.
BUG=b:186147823
TEST=autoupdate_Basic continued the update even if the encstateful was
full and it didn't block after the failure to allocate the p2p file.
Change-Id: Ibffe6f5a4903b3a43cee0ffdfa3ddf1789e4b659
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2848116
Tested-by: Amin Hassani <ahassani@chromium.org>
Auto-Submit: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
diff --git a/cros/download_action_chromeos.cc b/cros/download_action_chromeos.cc
index 0cc9f81..c7448aa 100644
--- a/cros/download_action_chromeos.cc
+++ b/cros/download_action_chromeos.cc
@@ -267,8 +267,7 @@
// that we should write to the file.
p2p_file_id_ = file_id;
LOG(INFO) << "Sharing p2p file with id: " << p2p_file_id_;
- if (!SetupP2PSharingFd())
- return;
+ SetupP2PSharingFd();
} else {
// Even if we're not sharing the update, it could be that
// there's a partial file from a previous attempt with the same