Skip to content

Conversation

@esskar
Copy link

@esskar esskar commented Sep 13, 2024

We encountered that on systems that have never connected any smart card readers, the application runs on 100%; the reason is the while loop around the SCardEstablishContext

@martinpaljak
Copy link

Maybe drop the sleep and the whole do-while (as the comments say) and have it fail fast instead?

@esskar
Copy link
Author

esskar commented Sep 15, 2024

@martinpaljak You are probably right; i thought about that as the while loop might be there to ensure if enabling the service takes a bit time (the win32 code before). But I do think it is the better solution to let the caller handle that case instead

@esskar
Copy link
Author

esskar commented Sep 25, 2024

Just for information: we published and tested this code internally and got rid of all the hangs.

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.

2 participants