{"action":"created","comment":{"url":"https://api.github.com/repos/weaveworks/common/pulls/comments/182101554","pull_request_review_id":112846090,"id":182101554,"diff_hunk":"@@ -162,12 +163,22 @@ func RegisterInstrumentation(router *mux.Router) {\n \n // Run the server; blocks until SIGTERM is received.\n func (s *Server) Run() {\n-\tgo s.httpServer.Serve(s.httpListener)\n+\tgo func() {\n+\t\tif err := s.httpServer.Serve(s.httpListener); err != http.ErrServerClosed {\n+\t\t\tlog.Errorf(\"error serving http: %v\", err)\n+\t\t\tos.Exit(1)","path":"server/server.go","position":31,"original_position":31,"commit_id":"bc7964abf4ecf92ab941c985d4287ce78d3c5c82","original_commit_id":"bc7964abf4ecf92ab941c985d4287ce78d3c5c82","user":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars2.githubusercontent.com/u/8125524?v=4","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"body":"I don't think we can call `os.Exit()` unconditionally, from a library.","created_at":"2018-04-17T14:51:29Z","updated_at":"2018-04-17T14:53:17Z","html_url":"https://github.com/weaveworks/common/pull/92#discussion_r182101554","pull_request_url":"https://api.github.com/repos/weaveworks/common/pulls/92","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/weaveworks/common/pulls/comments/182101554"},"html":{"href":"https://github.com/weaveworks/common/pull/92#discussion_r182101554"},"pull_request":{"href":"https://api.github.com/repos/weaveworks/common/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/weaveworks/common/pulls/92","id":178870504,"html_url":"https://github.com/weaveworks/common/pull/92","diff_url":"https://github.com/weaveworks/common/pull/92.diff","patch_url":"https://github.com/weaveworks/common/pull/92.patch","issue_url":"https://api.github.com/repos/weaveworks/common/issues/92","number":92,"state":"open","locked":false,"title":"Log errors and quit when http/grpc servers exit.","user":{"login":"gouthamve","id":7354143,"avatar_url":"https://avatars0.githubusercontent.com/u/7354143?v=4","gravatar_id":"","url":"https://api.github.com/users/gouthamve","html_url":"https://github.com/gouthamve","followers_url":"https://api.github.com/users/gouthamve/followers","following_url":"https://api.github.com/users/gouthamve/following{/other_user}","gists_url":"https://api.github.com/users/gouthamve/gists{/gist_id}","starred_url":"https://api.github.com/users/gouthamve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gouthamve/subscriptions","organizations_url":"https://api.github.com/users/gouthamve/orgs","repos_url":"https://api.github.com/users/gouthamve/repos","events_url":"https://api.github.com/users/gouthamve/events{/privacy}","received_events_url":"https://api.github.com/users/gouthamve/received_events","type":"User","site_admin":false},"body":"There was a case where the HTTP server died but the process exited. We\r\nneed to exit when the servers exit.\r\n\r\n\r\nQuirky that there are unused imports before, what am I missing?\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/weaveworks/common/92)\n<!-- Reviewable:end -->\n","created_at":"2018-04-02T16:11:27Z","updated_at":"2018-04-17T14:53:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd241940fc5a1beeb2dce513b8d9f47c5f9f18bb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/weaveworks/common/pulls/92/commits","review_comments_url":"https://api.github.com/repos/weaveworks/common/pulls/92/comments","review_comment_url":"https://api.github.com/repos/weaveworks/common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weaveworks/common/issues/92/comments","statuses_url":"https://api.github.com/repos/weaveworks/common/statuses/bc7964abf4ecf92ab941c985d4287ce78d3c5c82","head":{"label":"gouthamve:log-errors","ref":"log-errors","sha":"bc7964abf4ecf92ab941c985d4287ce78d3c5c82","user":{"login":"gouthamve","id":7354143,"avatar_url":"https://avatars0.githubusercontent.com/u/7354143?v=4","gravatar_id":"","url":"https://api.github.com/users/gouthamve","html_url":"https://github.com/gouthamve","followers_url":"https://api.github.com/users/gouthamve/followers","following_url":"https://api.github.com/users/gouthamve/following{/other_user}","gists_url":"https://api.github.com/users/gouthamve/gists{/gist_id}","starred_url":"https://api.github.com/users/gouthamve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gouthamve/subscriptions","organizations_url":"https://api.github.com/users/gouthamve/orgs","repos_url":"https://api.github.com/users/gouthamve/repos","events_url":"https://api.github.com/users/gouthamve/events{/privacy}","received_events_url":"https://api.github.com/users/gouthamve/received_events","type":"User","site_admin":false},"repo":{"id":127779528,"name":"common-1","full_name":"gouthamve/common-1","owner":{"login":"gouthamve","id":7354143,"avatar_url":"https://avatars0.githubusercontent.com/u/7354143?v=4","gravatar_id":"","url":"https://api.github.com/users/gouthamve","html_url":"https://github.com/gouthamve","followers_url":"https://api.github.com/users/gouthamve/followers","following_url":"https://api.github.com/users/gouthamve/following{/other_user}","gists_url":"https://api.github.com/users/gouthamve/gists{/gist_id}","starred_url":"https://api.github.com/users/gouthamve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gouthamve/subscriptions","organizations_url":"https://api.github.com/users/gouthamve/orgs","repos_url":"https://api.github.com/users/gouthamve/repos","events_url":"https://api.github.com/users/gouthamve/events{/privacy}","received_events_url":"https://api.github.com/users/gouthamve/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gouthamve/common-1","description":"Libraries used in multiple Weave projects","fork":true,"url":"https://api.github.com/repos/gouthamve/common-1","forks_url":"https://api.github.com/repos/gouthamve/common-1/forks","keys_url":"https://api.github.com/repos/gouthamve/common-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gouthamve/common-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gouthamve/common-1/teams","hooks_url":"https://api.github.com/repos/gouthamve/common-1/hooks","issue_events_url":"https://api.github.com/repos/gouthamve/common-1/issues/events{/number}","events_url":"https://api.github.com/repos/gouthamve/common-1/events","assignees_url":"https://api.github.com/repos/gouthamve/common-1/assignees{/user}","branches_url":"https://api.github.com/repos/gouthamve/common-1/branches{/branch}","tags_url":"https://api.github.com/repos/gouthamve/common-1/tags","blobs_url":"https://api.github.com/repos/gouthamve/common-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gouthamve/common-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gouthamve/common-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/gouthamve/common-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gouthamve/common-1/statuses/{sha}","languages_url":"https://api.github.com/repos/gouthamve/common-1/languages","stargazers_url":"https://api.github.com/repos/gouthamve/common-1/stargazers","contributors_url":"https://api.github.com/repos/gouthamve/common-1/contributors","subscribers_url":"https://api.github.com/repos/gouthamve/common-1/subscribers","subscription_url":"https://api.github.com/repos/gouthamve/common-1/subscription","commits_url":"https://api.github.com/repos/gouthamve/common-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/gouthamve/common-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/gouthamve/common-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/gouthamve/common-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/gouthamve/common-1/contents/{+path}","compare_url":"https://api.github.com/repos/gouthamve/common-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gouthamve/common-1/merges","archive_url":"https://api.github.com/repos/gouthamve/common-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gouthamve/common-1/downloads","issues_url":"https://api.github.com/repos/gouthamve/common-1/issues{/number}","pulls_url":"https://api.github.com/repos/gouthamve/common-1/pulls{/number}","milestones_url":"https://api.github.com/repos/gouthamve/common-1/milestones{/number}","notifications_url":"https://api.github.com/repos/gouthamve/common-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gouthamve/common-1/labels{/name}","releases_url":"https://api.github.com/repos/gouthamve/common-1/releases{/id}","deployments_url":"https://api.github.com/repos/gouthamve/common-1/deployments","created_at":"2018-04-02T16:05:13Z","updated_at":"2018-04-02T16:05:15Z","pushed_at":"2018-04-02T16:54:08Z","git_url":"git://github.com/gouthamve/common-1.git","ssh_url":"git@github.com:gouthamve/common-1.git","clone_url":"https://github.com/gouthamve/common-1.git","svn_url":"https://github.com/gouthamve/common-1","homepage":null,"size":749,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"weaveworks:master","ref":"master","sha":"ebab3a78900a09cebce8d0b37f2a69d474796bf4","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars1.githubusercontent.com/u/9976052?v=4","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":75649634,"name":"common","full_name":"weaveworks/common","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars1.githubusercontent.com/u/9976052?v=4","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/common","description":"Libraries used in multiple Weave projects","fork":false,"url":"https://api.github.com/repos/weaveworks/common","forks_url":"https://api.github.com/repos/weaveworks/common/forks","keys_url":"https://api.github.com/repos/weaveworks/common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/common/teams","hooks_url":"https://api.github.com/repos/weaveworks/common/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/common/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/common/events","assignees_url":"https://api.github.com/repos/weaveworks/common/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/common/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/common/tags","blobs_url":"https://api.github.com/repos/weaveworks/common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/common/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/common/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/common/languages","stargazers_url":"https://api.github.com/repos/weaveworks/common/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/common/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/common/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/common/subscription","commits_url":"https://api.github.com/repos/weaveworks/common/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/common/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/common/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/common/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/common/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/common/merges","archive_url":"https://api.github.com/repos/weaveworks/common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/common/downloads","issues_url":"https://api.github.com/repos/weaveworks/common/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/common/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/common/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/common/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/common/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/common/deployments","created_at":"2016-12-05T17:28:51Z","updated_at":"2018-04-17T13:27:59Z","pushed_at":"2018-04-17T13:27:57Z","git_url":"git://github.com/weaveworks/common.git","ssh_url":"git@github.com:weaveworks/common.git","clone_url":"https://github.com/weaveworks/common.git","svn_url":"https://github.com/weaveworks/common","homepage":null,"size":746,"stargazers_count":17,"watchers_count":17,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":17,"open_issues":13,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weaveworks/common/pulls/92"},"html":{"href":"https://github.com/weaveworks/common/pull/92"},"issue":{"href":"https://api.github.com/repos/weaveworks/common/issues/92"},"comments":{"href":"https://api.github.com/repos/weaveworks/common/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/weaveworks/common/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/weaveworks/common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weaveworks/common/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/weaveworks/common/statuses/bc7964abf4ecf92ab941c985d4287ce78d3c5c82"}},"author_association":"NONE"}}
{"actor":{"display_login":"bboreham"}}