| commit | 8edb1704cf7b656893396d08eb6143f1f2da9801 | [log] [tgz] |
|---|---|---|
| author | Amin Hassani <[email protected]> | Fri Apr 23 20:04:01 2021 |
| committer | Commit Bot <[email protected]> | Mon Apr 26 21:56:00 2021 |
| tree | c0d1ca223d4c2899607ab65752806a95ef337927 | |
| parent | 9128e09afae3a6390df7e27b5d2ef62d6794d53d [diff] |
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 <[email protected]> Auto-Submit: Amin Hassani <[email protected]> Reviewed-by: Jae Hoon Kim <[email protected]> Commit-Queue: Amin Hassani <[email protected]> (cherry picked from commit ea7ce057ed1210f3e0beace16bf9c94e38d4fb64) Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2852058 Reviewed-by: Amin Hassani <[email protected]>
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