Only cleanup identifiable slots
@@ -133,9 +133,12 @@ public class GetCardsAndPINStatusAction extends AbstractPINAction {
CardStateView cardView = cardCapturer.aquireView();
+ final byte[] slotHandle = cardView.getHandle().getSlotHandle();
+
+ if (slotHandle != null && slotHandle.length > 0) {
// destroy the pace channel
DestroyChannel destChannel = new DestroyChannel();
- destChannel.setSlotHandle(cardView.getHandle().getSlotHandle());
+ destChannel.setSlotHandle(slotHandle);
dispatcher.safeDeliver(destChannel);
// Transaction based communication does not work on java 8 so the PACE channel is not closed after an
@@ -145,6 +148,7 @@ public class GetCardsAndPINStatusAction extends AbstractPINAction {
disconnect.setAction(ActionType.RESET);
dispatcher.safeDeliver(disconnect);
}
+ }
} catch (WSException ex){
LOG.debug("Error while executing PIN Management.", ex);
throw new AppExtensionException(ex.getResultMinor(), ex.getMessage());
