Skip to content
This repository was archived by the owner on May 29, 2018. It is now read-only.

Commit 9cc973c

Browse files
committed
Close HTTP response body
1 parent 8f6dd18 commit 9cc973c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ func Append(u *url.URL, r io.Reader) error {
7777
// (via the WebSocket) to that file.
7878
func OpenAppend(u *url.URL) (io.WriteCloser, error) {
7979
ws, resp, err := newClient(u, "APPEND")
80+
if resp != nil {
81+
defer resp.Body.Close()
82+
}
8083
if err != nil {
8184
if err == websocket.ErrBadHandshake {
8285
err2 := errorFromResponse(resp, nil)

0 commit comments

Comments
 (0)