Merge lp:~vila/bzr/383920-pycurl-hangs into lp:~bzr/bzr/trunk-old
Proposed by
Vincent Ladeuil
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~vila/bzr/383920-pycurl-hangs |
Merge into: | lp:~bzr/bzr/trunk-old |
Diff against target: | 183 lines |
To merge this branch: | bzr merge lp:~vila/bzr/383920-pycurl-hangs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
John A Meinel | Approve | ||
Review via email: mp+8373@code.launchpad.net |
To post a comment you must log in.
The previous approach was not addressing the root cause.
The root cause is still a bit unclear as it involved python gc'ing a socket or not before
leaving pycurl polling it...
Anyway, this fix makes no hazardous assumption about the http protocol ;)
It explicitly shuts down the socket when the thread handling a http[s] connection is about
to finish. In our case, when the connection is closed by the server after sending a 404 error.
That may reduce the number of tests leaking threads, but it doesn't address all cases
(and it's hard to measure precisely anyway until we fix them all).