Fix DelayedSource.

This commit is contained in:
Nikolai Kochetov 2020-06-04 16:45:23 +03:00
parent b419d73880
commit 563fe4ea35

View File

@ -38,25 +38,25 @@ IProcessor::Status DelayedSource::prepare()
/// Process ports in order: main, totals, extremes
auto output = outputs.begin();
for (auto & input : inputs)
for (auto input = inputs.begin(); input != inputs.end(); ++input, ++output)
{
if (output->isFinished())
{
input.close();
input->close();
continue;
}
if (!output->isNeeded())
return Status::PortFull;
if (input.isFinished())
if (input->isFinished())
{
output->finish();
continue;
}
input.setNeeded();
if (!input.hasData())
input->setNeeded();
if (!input->hasData())
return Status::PortFull;
output->pushData(input.pullData(true));