-
Notifications
You must be signed in to change notification settings - Fork 8k
Ensure that socket timeouts are set only during the token validation #26066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
|
|
||
| // Acknowledge the token is valid with "PASS". | ||
| socket.Send("PASS"u8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment on behalf colleague, Can the timeout be triggered accidentally here?
|
/azp run PowerShell-CI-linux-packaging, PowerShell-Windows-Packaging-CI |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
…s and adjust socket timeouts accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
📣 Hey @@TravisEz13, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
…owerShell#26066) The main goal is to ensure that socket timeouts are set only during the token validation phase and are properly reset afterward, improving reliability and preventing unintended blocking or premature timeouts in subsequent operations.
…owerShell#26066) The main goal is to ensure that socket timeouts are set only during the token validation phase and are properly reset afterward, improving reliability and preventing unintended blocking or premature timeouts in subsequent operations.
PR Summary
This pull request refactors how socket timeouts are managed during token validation in
RemoteSessionHyperVSocket.cs. The main goal is to ensure that socket timeouts are set only during the token validation phase and are properly reset afterward, improving reliability and preventing unintended blocking or premature timeouts in subsequent operations.Socket Timeout Management Improvements:
RemoteSessionHyperVSocketServerconstructor to theValidateTokenmethod, ensuring timeouts are applied only during token validation. [1] [2]PR Context
This theoretical regression in #26057
This is theoretical because this code is not currently exercised.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header