Skip to content

[v12] Fixes the "Run as different user" window freezing#27875

Merged
ibeckermayer merged 6 commits intobranch/v12from
bot/backport-27779-branch/v12
Jun 16, 2023
Merged

[v12] Fixes the "Run as different user" window freezing#27875
ibeckermayer merged 6 commits intobranch/v12from
bot/backport-27779-branch/v12

Conversation

@ibeckermayer
Copy link
Copy Markdown
Contributor

Backport #27779 to branch/v12

Isaiah Becker-Mayer added 6 commits June 14, 2023 21:47
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.
@ibeckermayer ibeckermayer added this pull request to the merge queue Jun 16, 2023
Merged via the queue into branch/v12 with commit 9577274 Jun 16, 2023
@ibeckermayer ibeckermayer deleted the bot/backport-27779-branch/v12 branch June 16, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants