-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Description
I am a bit confused about cleanly closing the runtime after I am done with the reader I am interested in.
There is reader.disconnect() which is a wrapper around SCardDisconnect(), thus I obviously call it.
Then there is reader.close() which is intended to call SCardCancel() (for this specific reader?). I call it and get no errors.
Then there is pcsc.close() which is intended to also call SCardCancel() (for PnP reader tracking?). I call it and get an error event on pcsc: SCardGetStatusChange error: Command cancelled.(0x80100002). And the node process does not exit after this call. AFAIU SCardGetStatusChange should never emit an error if it is cancelled (I suspect this is a bug)
Two questions:
- How do I properly clean up the runtime, without calling
process.exit()? - Why are there two status checkers? AFAIU one call for
SCardGetStatusChangeshould be sufficient, also for getting events for the pnp pseudo-reader as well as any connected readers, to be able to emit reade events (thus apcsc.close()should be sufficient, and should result in normal exit of nodejs runtime?)
Metadata
Metadata
Assignees
Labels
No labels