Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Always close the HTTP response body (#726)
Browse files Browse the repository at this point in the history
Otherwise, OpenCensus span is never going to end.
  • Loading branch information
rakyll authored Apr 23, 2018
1 parent 5ea78fe commit 2639db1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/http/helloworld_server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ func main() {
resp, err := client.Do(r)
if err != nil {
log.Println(err)
} else {
// TODO: handle response
resp.Body.Close()
}
_ = resp // handle response
})
log.Fatal(http.ListenAndServe(":50030", &ochttp.Handler{}))
}

0 comments on commit 2639db1

Please sign in to comment.