gh-142403: Avoid leaking file descriptor in socket.py#142404
gh-142403: Avoid leaking file descriptor in socket.py#142404LumioseSil wants to merge 1 commit intopython:mainfrom
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
This comment was marked as resolved.
This comment was marked as resolved.
|
Please add a NEWS like as the bot requested. |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
3618b95 to
1a49740
Compare
1a49740 to
1651c84
Compare
|
Hi @AZero13 , according to the devguide, force push should be avoided. |
| if hasattr(selectors, 'PollSelector'): | ||
| selector = selectors.PollSelector() | ||
| else: | ||
| selector = selectors.SelectSelector() |
There was a problem hiding this comment.
I would prefer to keep this code to create the selector, it's more readable.
| selectors.PollSelector() | ||
| if hasattr(selectors, 'PollSelector') | ||
| else selectors.SelectSelector() | ||
| ) as selector: |
There was a problem hiding this comment.
I would prefer to use with selector: here.
| @@ -0,0 +1 @@ | |||
| Stop leaking the selector file descriptor, and release it when done. | |||
There was a problem hiding this comment.
Are you sure that there is a leak of a file descriptor? The selectors used by _sendfile_zerocopy() don't use a file descriptor: #142403 (comment)
Uh oh!
There was an error while loading. Please reload this page.