Fix DelayedSource

This commit is contained in:
Amos Bird 2020-10-13 10:18:30 +08:00
parent ca7a5ccd0d
commit 1c3fe943e0
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4

View File

@ -30,12 +30,12 @@ DelayedSource::DelayedSource(const Block & header, Creator processors_creator, b
IProcessor::Status DelayedSource::prepare()
{
/// At first, wait for main input is needed and expand pipeline.
/// At first, wait for main output is needed and expand pipeline.
if (inputs.empty())
{
auto & first_output = outputs.front();
/// If main port was finished before callback was called, stop execution.
/// If main output port was finished before callback was called, stop execution.
if (first_output.isFinished())
{
for (auto & output : outputs)
@ -75,7 +75,7 @@ IProcessor::Status DelayedSource::prepare()
input->setNeeded();
if (!input->hasData())
return Status::PortFull;
return Status::NeedData;
output->pushData(input->pullData(true));
return Status::PortFull;