if (clnSubscriptions.size() != 0) {
// cascaded client still has client subscriptions set cascaded mask
String cascadedMask = cascClient.evalSubscriptionMaskFromClientSubscriptions();
msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, cascadedMask);
cascClient.setSubscriptionMask(new SubscriptionMask(cascadedMask));
SCMPCscAbortSubscriptionCall cscAbortCall = new SCMPCscAbortSubscriptionCall(this.requester, msgToForward);
cscAbortCall.invoke(callback, oti);
return;
}
// no client subscription left - destroy client after XAB
SCMPCscAbortSubscriptionCall cscAbortCall = new SCMPCscAbortSubscriptionCall(this.requester, msgToForward);
cscAbortCall.invoke(callback, oti);
} catch (Exception e) {
callback.receive(e);
} finally {
// release permit in case any case
cascClient.getCascClientSemaphore().release();