{
//attempt delivery. returns true if no further delivery currently possible to this sub
subscriptionDone = attemptDelivery(sub, true);
if (subscriptionDone)
{
sub.flushBatched();
//close autoClose subscriptions if we are not currently intent on continuing
if (lastLoop && !sub.isSuspended() && sub.isAutoClose())
{
unregisterSubscription(sub);