Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A crash may happen removing a keycard reader #3

Closed
saledjenic opened this issue Mar 3, 2023 · 1 comment
Closed

A crash may happen removing a keycard reader #3

saledjenic opened this issue Mar 3, 2023 · 1 comment

Comments

@saledjenic
Copy link
Collaborator

Short context:

  • In order to detect a keycard reader connection on the client side we're starting the same flow in a loop (every 3 seconds) calling keycardStartFlow.
  • Since we need to detect a keycard reader removal if the current error (state) is keycard.action.insert-card, we're also using a loop on the client side, by canceling the current flow calling keycardCancelFlow, then wait for 3 seconds, then start the same flow again calling keycardStartFlow.

Use case:
Running the app and plugging in/out a keycard reader, based on above described scenario, appropriate states are displayed:

  • app asks to plugin the card reader -> user plugs it in
  • app asks to insert a keycard -> user plugs out a reader
  • app asks to plugin the card reader -> user plugs it in
  • app asks to insert a keycard -> user plugs out a reader
  • .
  • .
  • .
  • and so on in a loop till the card gets inserted

Issue:
In some point while user is plugging in/out a keycard reader the app crashes (doesn't happen often, like once in 15-20 tries) getting the following log from the keycard library:

a

@bitgamma
Copy link
Collaborator

should be fixed now, since this is also concurrency related and now all PCSC functions are gated through a single thread

@bitgamma bitgamma closed this as completed Jan 5, 2025
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

No branches or pull requests

2 participants