Merge lp:~axwalk/goose/close-response into lp:goose
Proposed by
Andrew Wilkins
Status: | Merged |
---|---|
Approved by: | Andrew Wilkins |
Approved revision: | 117 |
Merged at revision: | 119 |
Proposed branch: | lp:~axwalk/goose/close-response |
Merge into: | lp:goose |
Diff against target: |
12 lines (+2/-0) 1 file modified
http/client.go (+2/-0) |
To merge this branch: | bzr merge lp:~axwalk/goose/close-response |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+216822@code.launchpad.net |
Commit message
http: close response body if unused
BinaryRequest calls may discard the response
without closing it. This was causing sockets
to be left open in juju-core/
tests, leading to test failures.
Description of the change
http: close response body if unused
BinaryRequest calls may discard the response
without closing it. This was causing sockets
to be left open in juju-core/
tests, leading to test failures.
To post a comment you must log in.
Reviewers: mp+216822_ code.launchpad. net,
Message:
Please take a look.
Description:
http: close response body if unused
BinaryRequest calls may discard the response provider/ openstack
without closing it. This was causing sockets
to be left open in juju-core/
tests, leading to test failures.
https:/ /code.launchpad .net/~axwalk/ goose/close- response/ +merge/ 216822
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/90540043/
Affected files (+4, -0 lines):
A [revision details]
M http/client.go
Index: [revision details] 20140124165235- h9rloooc531udms 5
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: http/client.go RespReader = respBody
=== modified file 'http/client.go'
--- http/client.go 2013-10-18 01:52:13 +0000
+++ http/client.go 2014-04-23 06:57:55 +0000
@@ -180,6 +180,8 @@
}
if reqData.RespReader != nil {
reqData.
+ } else {
+ respBody.Close()
}
return
}