Skip to content

Commit c35130f

Browse files
Improve SCardDisconnect fix
Same justification as for the previous patch. RFReaderInfoById() may return SCARD_E_READER_UNAVAILABLE.
1 parent d7a0887 commit c35130f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/winscard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ LONG SCardDisconnect(SCARDHANDLE hCard, DWORD dwDisposition)
841841
/* get rContext corresponding to hCard */
842842
rv = RFReaderInfoById(hCard, &rContext);
843843
/* ignore reader removal */
844-
if (SCARD_E_INVALID_VALUE == rv)
844+
if (SCARD_E_INVALID_VALUE == rv || SCARD_E_READER_UNAVAILABLE == rv)
845845
return SCARD_S_SUCCESS;
846846
if (rv != SCARD_S_SUCCESS)
847847
return rv;

0 commit comments

Comments
 (0)