-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Use windows api to honour timeouts (fixes #3111) #3112
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Imogen <[email protected]>
Signed-off-by: Imogen <[email protected]>
Signed-off-by: Imogen <[email protected]>
Signed-off-by: Imogen <[email protected]>
milas
suggested changes
May 5, 2023
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.
See note about ensuring we close the handle explicitly, but LGTM otherwise! Thanks for the PR!
Signed-off-by: Imogen <[email protected]>
Signed-off-by: Imogen <[email protected]>
milas
approved these changes
May 7, 2023
Signed-off-by: Imogen <[email protected]>
felixfontein
added a commit
to felixfontein/community.docker
that referenced
this pull request
May 10, 2023
Cherry-picked from docker/docker-py@9cadad0 Co-authored-by: Imogen <[email protected]>
felixfontein
added a commit
to ansible-collections/community.docker
that referenced
this pull request
May 20, 2023
* socket: fix for errors on pipe close in Windows (docker/docker-py#3099) Need to return data, not size. By returning an empty string, EOF will be detected properly since `len()` will be `0`. Fixes docker/docker-py#3098. Cherry-picked from docker/docker-py@f846232 Co-authored-by: Milas Bowman <[email protected]> * socket: use poll() instead of select() except on Windows (docker/docker-py#2865) Fixes docker/docker-py#2278, which was originally addressed in docker/docker-py#2279, but was not properly merged. Additionally it did not address the problem of poll not existing on Windows. This patch falls back on the more limited select method if host system is Windows. Cherry-picked from docker/docker-py@a02ba74 Co-authored-by: Tyler Westland <[email protected]> * api: respect timeouts on Windows named pipes (docker/docker-py#3112) Cherry-picked from docker/docker-py@9cadad0 Co-authored-by: Imogen <[email protected]> * Add URL to changelog. * api: avoid socket timeouts when executing commands (docker/docker-py#3125) Only listen to read events when polling a socket in order to avoid incorrectly trying to read from a socket that is not actually ready. Cherry-picked from docker/docker-py@c5e582c Co-authored-by: Loïc Leyendecker <[email protected]> --------- Co-authored-by: Milas Bowman <[email protected]> Co-authored-by: Tyler Westland <[email protected]> Co-authored-by: Imogen <[email protected]> Co-authored-by: Loïc Leyendecker <[email protected]>
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.
This fixes #3111 by using the overlapped file IO mode and associated wait windows api functions.