mirror of
https://github.com/rclone/rclone.git
synced 2026-09-15 07:41:23 -04:00
_dispatchWaiters decided whether a waiter was satisfied by clipping its range against dls.src.Size(), the size of the fs.Object snapshot taken when the Downloaders was created. _ensureDownloader decided whether to start a downloader from Item.FindMissing, which clips against item.info.Size instead. When item.info.Size dropped below the offset a waiter was parked on while the source object still reported the full size, the two disagreed. _ensureDownloader found nothing missing so it started no downloader, and _dispatchWaiters found the range absent so it never released the waiter. Nothing was downloaded and no error was produced, so the error count never reached maxErrorCount and the waiter was never woken. The reader blocked forever with nothing logged at any level. Wake a waiter when FindMissing reports nothing left to download for it as well as when its data has arrived. Since _ensureDownloader starts a downloader only when FindMissing is non empty, a waiter with nothing missing has nothing that could ever wake it. Fixes #9769