(cherry picked from commit cefa21e98a12b06602ee8000f8cef6c3b17af999)
@@ -716,7 +716,7 @@ public class Dispatcher {
long blockSize = pendingBlock.block.getNumBytes();
incScheduledSize(-blockSize);
task.size -= blockSize;
- if (task.size == 0) {
+ if (task.size <= 0) {
i.remove();
}
return pendingBlock;