=str - 19082 - Moves the allow var into the Logic of DropWithin

This commit is contained in:
Viktor Klang 2015-12-07 12:41:38 +01:00
parent 02ee319568
commit 8b0b63625e

View file

@ -880,9 +880,10 @@ private[stream] class TakeWithin[T](timeout: FiniteDuration) extends SimpleLinea
}
private[stream] class DropWithin[T](timeout: FiniteDuration) extends SimpleLinearGraphStage[T] {
private var allow = false
override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = new TimerGraphStageLogic(shape) {
private var allow = false
setHandler(in, new InHandler {
override def onPush(): Unit =
if (allow) push(out, grab(in))