{"action":"created","comment":{"url":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/comments/22997194","id":22997194,"diff_hunk":"@@ -167,6 +167,9 @@ func (c *Container) AwaitListening() bool {\n \t\turl := fmt.Sprint(\"http://\", port.IP, \":\", port.PublicPort, \"/\")\n \t\tfor {\n \t\t\tresponse, err := http.Get(url)\n+\t\t\tif response != nil && response.Body != nil {\n+\t\t\t\tresponse.Body.Close()","path":"container.go","position":5,"original_position":5,"commit_id":"148fecce2c30fa3c477a6fd97446c11a665930ae","original_commit_id":"148fecce2c30fa3c477a6fd97446c11a665930ae","user":{"login":"frabcus","id":10153,"avatar_url":"https://avatars.githubusercontent.com/u/10153?v=3","gravatar_id":"","url":"https://api.github.com/users/frabcus","html_url":"https://github.com/frabcus","followers_url":"https://api.github.com/users/frabcus/followers","following_url":"https://api.github.com/users/frabcus/following{/other_user}","gists_url":"https://api.github.com/users/frabcus/gists{/gist_id}","starred_url":"https://api.github.com/users/frabcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frabcus/subscriptions","organizations_url":"https://api.github.com/users/frabcus/orgs","repos_url":"https://api.github.com/users/frabcus/repos","events_url":"https://api.github.com/users/frabcus/events{/privacy}","received_events_url":"https://api.github.com/users/frabcus/received_events","type":"User","site_admin":false},"body":"\r\n\r\nOh wow! You really have to read the docs carefully to use Go :(\r\n\r\nAm I right that the only way of knowing this would be to have properly read right through to the last senhttp://golang.org/pkg/net/http/#Client.Get where it says \"Caller should close resp.Body when done reading from it\"?\r\n","created_at":"2015-01-15T09:03:26Z","updated_at":"2015-01-15T09:03:26Z","html_url":"https://github.com/scraperwiki/hanoverd/pull/32#discussion_r22997194","pull_request_url":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/comments/22997194"},"html":{"href":"https://github.com/scraperwiki/hanoverd/pull/32#discussion_r22997194"},"pull_request":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/32","id":27412942,"html_url":"https://github.com/scraperwiki/hanoverd/pull/32","diff_url":"https://github.com/scraperwiki/hanoverd/pull/32.diff","patch_url":"https://github.com/scraperwiki/hanoverd/pull/32.patch","issue_url":"https://api.github.com/repos/scraperwiki/hanoverd/issues/32","number":32,"state":"open","locked":false,"title":"Fix for file descriptor exhaustion","user":{"login":"pwaller","id":438648,"avatar_url":"https://avatars.githubusercontent.com/u/438648?v=3","gravatar_id":"","url":"https://api.github.com/users/pwaller","html_url":"https://github.com/pwaller","followers_url":"https://api.github.com/users/pwaller/followers","following_url":"https://api.github.com/users/pwaller/following{/other_user}","gists_url":"https://api.github.com/users/pwaller/gists{/gist_id}","starred_url":"https://api.github.com/users/pwaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwaller/subscriptions","organizations_url":"https://api.github.com/users/pwaller/orgs","repos_url":"https://api.github.com/users/pwaller/repos","events_url":"https://api.github.com/users/pwaller/events{/privacy}","received_events_url":"https://api.github.com/users/pwaller/received_events","type":"User","site_admin":false},"body":"It was forgotten to close the `response.Body`.","created_at":"2015-01-15T08:37:27Z","updated_at":"2015-01-15T09:03:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51d5c62ca97435628345be43aa8879affb92baf8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/32/commits","review_comments_url":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/32/comments","review_comment_url":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/comments/{number}","comments_url":"https://api.github.com/repos/scraperwiki/hanoverd/issues/32/comments","statuses_url":"https://api.github.com/repos/scraperwiki/hanoverd/statuses/148fecce2c30fa3c477a6fd97446c11a665930ae","head":{"label":"scraperwiki:fix-file-exhaustion","ref":"fix-file-exhaustion","sha":"148fecce2c30fa3c477a6fd97446c11a665930ae","user":{"login":"scraperwiki","id":1050343,"avatar_url":"https://avatars.githubusercontent.com/u/1050343?v=3","gravatar_id":"","url":"https://api.github.com/users/scraperwiki","html_url":"https://github.com/scraperwiki","followers_url":"https://api.github.com/users/scraperwiki/followers","following_url":"https://api.github.com/users/scraperwiki/following{/other_user}","gists_url":"https://api.github.com/users/scraperwiki/gists{/gist_id}","starred_url":"https://api.github.com/users/scraperwiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scraperwiki/subscriptions","organizations_url":"https://api.github.com/users/scraperwiki/orgs","repos_url":"https://api.github.com/users/scraperwiki/repos","events_url":"https://api.github.com/users/scraperwiki/events{/privacy}","received_events_url":"https://api.github.com/users/scraperwiki/received_events","type":"Organization","site_admin":false},"repo":{"id":26828959,"name":"hanoverd","full_name":"scraperwiki/hanoverd","owner":{"login":"scraperwiki","id":1050343,"avatar_url":"https://avatars.githubusercontent.com/u/1050343?v=3","gravatar_id":"","url":"https://api.github.com/users/scraperwiki","html_url":"https://github.com/scraperwiki","followers_url":"https://api.github.com/users/scraperwiki/followers","following_url":"https://api.github.com/users/scraperwiki/following{/other_user}","gists_url":"https://api.github.com/users/scraperwiki/gists{/gist_id}","starred_url":"https://api.github.com/users/scraperwiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scraperwiki/subscriptions","organizations_url":"https://api.github.com/users/scraperwiki/orgs","repos_url":"https://api.github.com/users/scraperwiki/repos","events_url":"https://api.github.com/users/scraperwiki/events{/privacy}","received_events_url":"https://api.github.com/users/scraperwiki/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scraperwiki/hanoverd","description":"Docker handover daemon","fork":false,"url":"https://api.github.com/repos/scraperwiki/hanoverd","forks_url":"https://api.github.com/repos/scraperwiki/hanoverd/forks","keys_url":"https://api.github.com/repos/scraperwiki/hanoverd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scraperwiki/hanoverd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scraperwiki/hanoverd/teams","hooks_url":"https://api.github.com/repos/scraperwiki/hanoverd/hooks","issue_events_url":"https://api.github.com/repos/scraperwiki/hanoverd/issues/events{/number}","events_url":"https://api.github.com/repos/scraperwiki/hanoverd/events","assignees_url":"https://api.github.com/repos/scraperwiki/hanoverd/assignees{/user}","branches_url":"https://api.github.com/repos/scraperwiki/hanoverd/branches{/branch}","tags_url":"https://api.github.com/repos/scraperwiki/hanoverd/tags","blobs_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/refs{/sha}","trees_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scraperwiki/hanoverd/statuses/{sha}","languages_url":"https://api.github.com/repos/scraperwiki/hanoverd/languages","stargazers_url":"https://api.github.com/repos/scraperwiki/hanoverd/stargazers","contributors_url":"https://api.github.com/repos/scraperwiki/hanoverd/contributors","subscribers_url":"https://api.github.com/repos/scraperwiki/hanoverd/subscribers","subscription_url":"https://api.github.com/repos/scraperwiki/hanoverd/subscription","commits_url":"https://api.github.com/repos/scraperwiki/hanoverd/commits{/sha}","git_commits_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/commits{/sha}","comments_url":"https://api.github.com/repos/scraperwiki/hanoverd/comments{/number}","issue_comment_url":"https://api.github.com/repos/scraperwiki/hanoverd/issues/comments/{number}","contents_url":"https://api.github.com/repos/scraperwiki/hanoverd/contents/{+path}","compare_url":"https://api.github.com/repos/scraperwiki/hanoverd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scraperwiki/hanoverd/merges","archive_url":"https://api.github.com/repos/scraperwiki/hanoverd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scraperwiki/hanoverd/downloads","issues_url":"https://api.github.com/repos/scraperwiki/hanoverd/issues{/number}","pulls_url":"https://api.github.com/repos/scraperwiki/hanoverd/pulls{/number}","milestones_url":"https://api.github.com/repos/scraperwiki/hanoverd/milestones{/number}","notifications_url":"https://api.github.com/repos/scraperwiki/hanoverd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scraperwiki/hanoverd/labels{/name}","releases_url":"https://api.github.com/repos/scraperwiki/hanoverd/releases{/id}","created_at":"2014-11-18T20:40:06Z","updated_at":"2014-12-12T10:29:23Z","pushed_at":"2015-01-15T08:37:23Z","git_url":"git://github.com/scraperwiki/hanoverd.git","ssh_url":"git@github.com:scraperwiki/hanoverd.git","clone_url":"https://github.com/scraperwiki/hanoverd.git","svn_url":"https://github.com/scraperwiki/hanoverd","homepage":"","size":844,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"scraperwiki:master","ref":"master","sha":"3e36515fa69dd61ade6bd07e8bb44e8ebed1ab14","user":{"login":"scraperwiki","id":1050343,"avatar_url":"https://avatars.githubusercontent.com/u/1050343?v=3","gravatar_id":"","url":"https://api.github.com/users/scraperwiki","html_url":"https://github.com/scraperwiki","followers_url":"https://api.github.com/users/scraperwiki/followers","following_url":"https://api.github.com/users/scraperwiki/following{/other_user}","gists_url":"https://api.github.com/users/scraperwiki/gists{/gist_id}","starred_url":"https://api.github.com/users/scraperwiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scraperwiki/subscriptions","organizations_url":"https://api.github.com/users/scraperwiki/orgs","repos_url":"https://api.github.com/users/scraperwiki/repos","events_url":"https://api.github.com/users/scraperwiki/events{/privacy}","received_events_url":"https://api.github.com/users/scraperwiki/received_events","type":"Organization","site_admin":false},"repo":{"id":26828959,"name":"hanoverd","full_name":"scraperwiki/hanoverd","owner":{"login":"scraperwiki","id":1050343,"avatar_url":"https://avatars.githubusercontent.com/u/1050343?v=3","gravatar_id":"","url":"https://api.github.com/users/scraperwiki","html_url":"https://github.com/scraperwiki","followers_url":"https://api.github.com/users/scraperwiki/followers","following_url":"https://api.github.com/users/scraperwiki/following{/other_user}","gists_url":"https://api.github.com/users/scraperwiki/gists{/gist_id}","starred_url":"https://api.github.com/users/scraperwiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scraperwiki/subscriptions","organizations_url":"https://api.github.com/users/scraperwiki/orgs","repos_url":"https://api.github.com/users/scraperwiki/repos","events_url":"https://api.github.com/users/scraperwiki/events{/privacy}","received_events_url":"https://api.github.com/users/scraperwiki/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scraperwiki/hanoverd","description":"Docker handover daemon","fork":false,"url":"https://api.github.com/repos/scraperwiki/hanoverd","forks_url":"https://api.github.com/repos/scraperwiki/hanoverd/forks","keys_url":"https://api.github.com/repos/scraperwiki/hanoverd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scraperwiki/hanoverd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scraperwiki/hanoverd/teams","hooks_url":"https://api.github.com/repos/scraperwiki/hanoverd/hooks","issue_events_url":"https://api.github.com/repos/scraperwiki/hanoverd/issues/events{/number}","events_url":"https://api.github.com/repos/scraperwiki/hanoverd/events","assignees_url":"https://api.github.com/repos/scraperwiki/hanoverd/assignees{/user}","branches_url":"https://api.github.com/repos/scraperwiki/hanoverd/branches{/branch}","tags_url":"https://api.github.com/repos/scraperwiki/hanoverd/tags","blobs_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/refs{/sha}","trees_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scraperwiki/hanoverd/statuses/{sha}","languages_url":"https://api.github.com/repos/scraperwiki/hanoverd/languages","stargazers_url":"https://api.github.com/repos/scraperwiki/hanoverd/stargazers","contributors_url":"https://api.github.com/repos/scraperwiki/hanoverd/contributors","subscribers_url":"https://api.github.com/repos/scraperwiki/hanoverd/subscribers","subscription_url":"https://api.github.com/repos/scraperwiki/hanoverd/subscription","commits_url":"https://api.github.com/repos/scraperwiki/hanoverd/commits{/sha}","git_commits_url":"https://api.github.com/repos/scraperwiki/hanoverd/git/commits{/sha}","comments_url":"https://api.github.com/repos/scraperwiki/hanoverd/comments{/number}","issue_comment_url":"https://api.github.com/repos/scraperwiki/hanoverd/issues/comments/{number}","contents_url":"https://api.github.com/repos/scraperwiki/hanoverd/contents/{+path}","compare_url":"https://api.github.com/repos/scraperwiki/hanoverd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scraperwiki/hanoverd/merges","archive_url":"https://api.github.com/repos/scraperwiki/hanoverd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scraperwiki/hanoverd/downloads","issues_url":"https://api.github.com/repos/scraperwiki/hanoverd/issues{/number}","pulls_url":"https://api.github.com/repos/scraperwiki/hanoverd/pulls{/number}","milestones_url":"https://api.github.com/repos/scraperwiki/hanoverd/milestones{/number}","notifications_url":"https://api.github.com/repos/scraperwiki/hanoverd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scraperwiki/hanoverd/labels{/name}","releases_url":"https://api.github.com/repos/scraperwiki/hanoverd/releases{/id}","created_at":"2014-11-18T20:40:06Z","updated_at":"2014-12-12T10:29:23Z","pushed_at":"2015-01-15T08:37:23Z","git_url":"git://github.com/scraperwiki/hanoverd.git","ssh_url":"git@github.com:scraperwiki/hanoverd.git","clone_url":"https://github.com/scraperwiki/hanoverd.git","svn_url":"https://github.com/scraperwiki/hanoverd","homepage":"","size":844,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/32"},"html":{"href":"https://github.com/scraperwiki/hanoverd/pull/32"},"issue":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/issues/32"},"comments":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/scraperwiki/hanoverd/statuses/148fecce2c30fa3c477a6fd97446c11a665930ae"}}}}