Avoid terminating MultiRangeHttpFetcher twice.
If the delegate (DownloadAction) called TerminateTransfer() in the
ReceivedBytes() callback, and we received all bytes of the current
range, it will try to terminate again.
This only happens if the base fetcher is FileFetcher, but not
LibcurlHttpFetcher because LibcurlHttpFetcher can not terminate in
a write callback, while FileFetcher doesn't have this limit.
Bug: 68141222
Test: scripts/update_device.py dummy-ota-ab-small.dev.ab39d95e.zip --file
Change-Id: Ibe228241055abfa50cb7b916f4216bb0ae3e54ab
1 file changed