Skip to content

[v11] Fixes the "Run as different user" window freezing#27876

Merged
espadolini merged 7 commits intobranch/v11from
bot/backport-27779-branch/v11
Jun 19, 2023
Merged

[v11] Fixes the "Run as different user" window freezing#27876
espadolini merged 7 commits intobranch/v11from
bot/backport-27779-branch/v11

Conversation

@ibeckermayer
Copy link
Copy Markdown
Contributor

Backport #27779 to branch/v11

Isaiah Becker-Mayer 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.
@ibeckermayer ibeckermayer added this pull request to the merge queue Jun 16, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 16, 2023
@ibeckermayer ibeckermayer added this pull request to the merge queue Jun 16, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 16, 2023
@ibeckermayer ibeckermayer enabled auto-merge June 16, 2023 18:32
@ibeckermayer ibeckermayer added this pull request to the merge queue Jun 16, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 16, 2023
@espadolini espadolini added this pull request to the merge queue Jun 19, 2023
Merged via the queue into branch/v11 with commit dfde5f6 Jun 19, 2023
@espadolini espadolini deleted the bot/backport-27779-branch/v11 branch June 19, 2023 08:43
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