diff --git a/src/smartcard/pcsc/PCSCCardRequest.py b/src/smartcard/pcsc/PCSCCardRequest.py
index 74e9831..71e3e24 100644
--- a/src/smartcard/pcsc/PCSCCardRequest.py
+++ b/src/smartcard/pcsc/PCSCCardRequest.py
@@ -253,6 +253,10 @@ class PCSCCardRequest(AbstractCardRequest):
elif SCARD_E_UNKNOWN_READER == hresult:
pass
+ # this happens on Windows when the last reader is disconnected
+ elif hresult in (SCARD_E_SYSTEM_CANCELLED, SCARD_E_NO_SERVICE):
+ pass
+
# some error happened
elif SCARD_S_SUCCESS != hresult:
raise CardRequestException(
@@ -381,6 +385,10 @@ class PCSCCardRequest(AbstractCardRequest):
elif SCARD_E_UNKNOWN_READER == hresult:
pass
+ # this happens on Windows when the last reader is disconnected
+ elif hresult in (SCARD_E_SYSTEM_CANCELLED, SCARD_E_NO_SERVICE):
+ pass
+
# some error happened
elif SCARD_S_SUCCESS != hresult:
raise CardRequestException(