Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue21032

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Socket leak if HTTPConnection.getresponse() fails
Type:resource usageStage:resolved
Components:Library (Lib)Versions:Python 3.4, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: fbidu, martin.panter, python-dev, serhiy.storchaka
Priority:normalKeywords:patch

Created on2014-03-23 04:05 bymartin.panter, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
test.patchmartin.panter,2014-03-23 04:05review
close.patchmartin.panter,2014-03-23 04:06
Pull Requests
URLStatusLinkedEdit
PR 22737fbidu,2020-10-23 19:09
Messages (7)
msg214546 -(view)Author: Martin Panter (martin.panter)*(Python committer)Date: 2014-03-23 04:05
Here is a regression test and patch to close the socket reader when a HTTP server causes getresponse() to fail, for instance if the server times out and drops the connection without sending any response. Without the patch the socket will only be closed by the garbage collector at some arbitrary point.
msg231330 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-11-18 17:21
Could you please submit a contributor form (https://www.python.org/psf/contrib/) Martin?
msg231917 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-12-01 09:15
What is the status of your contributor agreement Martin?
msg231922 -(view)Author: Martin Panter (martin.panter)*(Python committer)Date: 2014-12-01 09:37
Hi Serhiy, I submitted the form online on 22 Nov; just patiently waiting for it to come through now.In the last few minutes I noticed an asterisk has appeared against my name on the bug tracker, so hopefully it is all good now.
msg231923 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-12-01 09:52
New changeset561d1d0de518 by Serhiy Storchaka in branch 'default':Issue#21032: Deprecated the use of re.LOCALE flag with str patterns orhttps://hg.python.org/cpython/rev/561d1d0de518
msg231930 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-12-01 11:16
New changesetf88c00391dd8 by Serhiy Storchaka in branch '2.7':Issue#21032. Fixed socket leak if HTTPConnection.getresponse() fails.https://hg.python.org/cpython/rev/f88c00391dd8New changesetba72da4883eb by Serhiy Storchaka in branch '3.4':Issue#21032. Fixed socket leak if HTTPConnection.getresponse() fails.https://hg.python.org/cpython/rev/ba72da4883ebNew changeset62a058c76869 by Serhiy Storchaka in branch 'default':Issue#21032. Fixed socket leak if HTTPConnection.getresponse() fails.https://hg.python.org/cpython/rev/62a058c76869
msg231934 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-12-01 11:24
Few notes about patches. Check patches for trailing spaces. And it would be more suitable if you provide single patch instead of a couple of patches. I have slightly changed the test, so it checks that the file is actually closed, not lost, The fix LGTM.Thank you for your contribution Martin.
History
DateUserActionArgs
2022-04-11 14:58:00adminsetgithub: 65231
2020-10-23 19:09:49fbidusetnosy: +fbidu

pull_requests: +pull_request21848
2014-12-01 11:24:01serhiy.storchakasetstatus: open -> closed
versions: + Python 2.7
messages: +msg231934

resolution: fixed
stage: patch review -> resolved
2014-12-01 11:16:43python-devsetmessages: +msg231930
2014-12-01 09:52:11python-devsetnosy: +python-dev
messages: +msg231923
2014-12-01 09:37:34martin.pantersetmessages: +msg231922
2014-12-01 09:15:24serhiy.storchakasetmessages: +msg231917
2014-11-18 17:21:19serhiy.storchakasetversions: + Python 3.5
nosy: +serhiy.storchaka

messages: +msg231330

assignee:serhiy.storchaka
stage: patch review
2014-03-23 04:06:13martin.pantersetfiles: +close.patch
2014-03-23 04:05:47martin.pantercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp