=doc Invalid FrameParser example fixed #20519

This commit is contained in:
Johan Andrén 2016-06-03 14:24:31 +02:00
parent b84c6c5271
commit 2643857e82
2 changed files with 6 additions and 0 deletions

View file

@ -165,9 +165,12 @@ public class BidiFlowDocTest extends AbstractJavaTest {
@Override
public void onUpstreamFinish() throws Exception {
// either we are done
if (stash.isEmpty()) completeStage();
// or we still have bytes to emit
// wait with completion and let run() complete when the
// rest of the stash has been sent downstream
else if (isAvailable(out)) run();
}
});

View file

@ -93,9 +93,12 @@ object BidiFlowDocSpec {
}
override def onUpstreamFinish(): Unit = {
// either we are done
if (stash.isEmpty) completeStage()
// or we still have bytes to emit
// wait with completion and let run() complete when the
// rest of the stash has been sent downstream
else if (isAvailable(out)) run()
}
})