diff --git a/package.json b/package.json index dad5d95..c72eef0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pokusew/pcsclite", - "version": "0.6.0", + "version": "0.6.1", "description": "Bindings over PC/SC to access Smart Cards", "keywords": [ "nfc", diff --git a/src/pcsclite.cpp b/src/pcsclite.cpp index dd66881..abd541b 100644 --- a/src/pcsclite.cpp +++ b/src/pcsclite.cpp @@ -67,15 +67,12 @@ PCSCLite::PCSCLite(): m_card_context(0), postServiceCheck: #endif // _WIN32 - LONG result; - // TODO: consider removing this do-while Windows workaround that should not be needed anymore - do { - // TODO: make dwScope (now hard-coded to SCARD_SCOPE_SYSTEM) customisable - result = SCardEstablishContext(SCARD_SCOPE_SYSTEM, - NULL, - NULL, - &m_card_context); - } while(result == SCARD_E_NO_SERVICE || result == SCARD_E_SERVICE_STOPPED); + // TODO: make dwScope (now hard-coded to SCARD_SCOPE_SYSTEM) customisable + LONG result = SCardEstablishContext(SCARD_SCOPE_SYSTEM, + NULL, + NULL, + &m_card_context); + if (result != SCARD_S_SUCCESS) { Nan::ThrowError(error_msg("SCardEstablishContext", result).c_str()); } else {