8169026: Handle smartcard clean up better
Reviewed-by: valeriep, ahgross
This commit is contained in:
parent
2b71ce6a46
commit
1a21126223
@ -270,7 +270,7 @@ final class CardImpl extends Card {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "PC/SC card in " + terminal.getName()
|
||||
return "PC/SC card in " + terminal.name
|
||||
+ ", protocol " + getProtocol() + ", state " + state;
|
||||
}
|
||||
|
||||
@ -278,6 +278,7 @@ final class CardImpl extends Card {
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
if (state == State.OK) {
|
||||
state = State.DISCONNECTED;
|
||||
SCardDisconnect(cardId, SCARD_LEAVE_CARD);
|
||||
}
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user