#19094 fix double pull in PoolConductor

This commit is contained in:
Roland Kuhn 2016-01-12 16:45:53 +01:00
parent 84fd5a9b2a
commit bc4800149f

View file

@ -140,15 +140,16 @@ private object PoolConductor {
slotStates(slotIx) = slotStateAfterDisconnect(slotStates(slotIx), failed)
}
pull(slotIn)
val tryPull = nextSlot == -1
val wasBlocked = nextSlot == -1
nextSlot = bestSlot()
if (tryPull) tryPullCtx()
val nowUnblocked = nextSlot != -1
if (wasBlocked && nowUnblocked) pull(ctxIn) // get next request context
}
})
setHandler(out, eagerTerminateOutput)
val tryPullCtx = () if (nextSlot != -1) pull(ctxIn)
val tryPullCtx = () if (nextSlot != -1 && !hasBeenPulled(ctxIn)) pull(ctxIn)
override def preStart(): Unit = {
pull(ctxIn)