Skip to content

Conversation

satlank
Copy link
Contributor

@satlank satlank commented Aug 11, 2022

Shadowing encoded makes the async block not send which prevents
sharing it across threads. Just do the generation of the encoded values
through temporary variables instead of shadowing.

The added code in the test module will fail to compile without the
accompanying code changes.

Shadowing `encoded` makes the async block not send which prevents
sharing it across threads.  Just do the generation of the encoded values
through temporary variables instead of shadowing.

The added code in the test module will fail to compile without the
accompanying code changes.
@ghost
Copy link

ghost commented Aug 11, 2022

CLA assistant check
All CLA requirements met.

Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! This code is also more readable too.

I'd like the test to be simpler though (and I offer a way that could look), and we should also make sure the test is clear what is being tested.

Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@rylev rylev merged commit 7133803 into Azure:main Aug 11, 2022
@satlank satlank deleted the fixDeviceCodeFlowLifetime branch August 11, 2022 15:47
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