[v11] Fixes the "Run as different user" window freezing#27876
Merged
espadolini merged 7 commits intobranch/v11from Jun 19, 2023
Merged
[v11] Fixes the "Run as different user" window freezing#27876espadolini merged 7 commits intobranch/v11from
espadolini merged 7 commits intobranch/v11from
Conversation
added 6 commits
June 14, 2023 21:46
The problem was that we were occasionally getting SCARD_IOCTL_GETSTATUSCHANGEW calls with infinite timeouts, which we would never return from because our status never changes. This is the correct behavior in the short run, but we were ignoring the meaning of SCARD_IOCTL_CANCEL, which tells such long-hanging calls to return with an SCARD_E_CANCELLED return value. This was causing the "Run as different user" window to freeze, because something internally was waiting around for an SCARD_E_CANCELLED that would never come. To fix this, now whenever we get an SCARD_IOCTL_GETSTATUSCHANGEW with an infinite timeout, we add to the corresponding context a DeviceControlResponse that wraps the necessary SCARD_E_CANCELLED return value. Later, when an SCARD_IOCTL_CANCEL is received for that context, we grab the DeviceControlResponse and return it.
zmb3
approved these changes
Jun 14, 2023
espadolini
approved these changes
Jun 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #27779 to branch/v11