Skip to content

Commit

Permalink
Improve SCardDisconnect fix
Browse files Browse the repository at this point in the history
Same justification as for the previous patch. RFReaderInfoById() may
return SCARD_E_READER_UNAVAILABLE.
  • Loading branch information
LudovicRousseau committed Jun 19, 2022
1 parent d7a0887 commit c35130f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/winscard.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ LONG SCardDisconnect(SCARDHANDLE hCard, DWORD dwDisposition)
/* get rContext corresponding to hCard */
rv = RFReaderInfoById(hCard, &rContext);
/* ignore reader removal */
if (SCARD_E_INVALID_VALUE == rv)
if (SCARD_E_INVALID_VALUE == rv || SCARD_E_READER_UNAVAILABLE == rv)
return SCARD_S_SUCCESS;
if (rv != SCARD_S_SUCCESS)
return rv;
Expand Down

0 comments on commit c35130f

Please sign in to comment.