Skip to content

Commit

Permalink
added SCARD_E_NO_SERVICE calls renewContext
Browse files Browse the repository at this point in the history
  • Loading branch information
mbokil committed Mar 27, 2023
1 parent 47230d2 commit 43e40b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smartcard/pcsc/PCSCCardRequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def getReaderNames(self):

# get inserted readers
hresult, pcscreaders = SCardListReaders(self.hcontext, [])
if SCARD_E_SERVICE_STOPPED == hresult:
if SCARD_E_SERVICE_STOPPED == hresult or SCARD_E_NO_SERVICE == hresult:
self.hcontext = PCSCContext().renewContext()
hresult, pcscreaders = SCardListReaders(self.hcontext, [])
if SCARD_E_NO_READERS_AVAILABLE == hresult:
Expand Down

0 comments on commit 43e40b9

Please sign in to comment.