Skip to content

Improve event handling on macOS and Windows#117

Open
liamcmitchell wants to merge 2 commits intotomkp:masterfrom
liamcmitchell:macos-win-issues
Open

Improve event handling on macOS and Windows#117
liamcmitchell wants to merge 2 commits intotomkp:masterfrom
liamcmitchell:macos-win-issues

Conversation

@liamcmitchell
Copy link

Hi, I came across #111 and similar issues on macOS.

  • on win, card add/remove is often missed
  • on mac, if started with attached reader and inserted card, card removed is incorrectly emitted a second later (caused by your recent fixes?)

The following changes fix the issues for me:

  • added a small retry when a card is inserted, so brief reader-list delays don’t cause misses
  • cleaned up compiler warnings with explicit casts
  • updated card presence when reader lists change (PnP)
  • made reader/card state handling more reliable during reader add/remove churn
  • improved refresh logic for already-known readers
  • changed JS callback delivery to non-blocking to avoid shutdown stalls/deadlocks

Tested on Linux/macOS/Windows with node dist/examples/monitor-cards.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant