{"action":"closed","number":149,"pull_request":{"url":"https://api.github.com/repos/grpc/grpc-swift/pulls/149","id":171783371,"html_url":"https://github.com/grpc/grpc-swift/pull/149","diff_url":"https://github.com/grpc/grpc-swift/pull/149.diff","patch_url":"https://github.com/grpc/grpc-swift/pull/149.patch","issue_url":"https://api.github.com/repos/grpc/grpc-swift/issues/149","number":149,"state":"closed","locked":false,"title":"Also call `shutdown` in `Handler.sendStatus`","user":{"login":"MrMage","id":117466,"avatar_url":"https://avatars1.githubusercontent.com/u/117466?v=4","gravatar_id":"","url":"https://api.github.com/users/MrMage","html_url":"https://github.com/MrMage","followers_url":"https://api.github.com/users/MrMage/followers","following_url":"https://api.github.com/users/MrMage/following{/other_user}","gists_url":"https://api.github.com/users/MrMage/gists{/gist_id}","starred_url":"https://api.github.com/users/MrMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrMage/subscriptions","organizations_url":"https://api.github.com/users/MrMage/orgs","repos_url":"https://api.github.com/users/MrMage/repos","events_url":"https://api.github.com/users/MrMage/events{/privacy}","received_events_url":"https://api.github.com/users/MrMage/received_events","type":"User","site_admin":false},"body":"Without this, completion queues for server-side sessions _never_ get released, leaking the handler, the operation queue, and the thread the operation queue runs on. Given that GCD by default only spawns ~60 threads for its default operation queue, this can make the whole server process unusable very quickly (after processing roughly 60 events).\r\n\r\nI also plan to add tests for this and other cases soon, but before that I'd like to do more cleanup and refactoring to streamline the generated code's interface, to make it more usable and more resilient to such errors.\r\n\r\nIn addition, we now call `shutdown` without checking for the corresponding operation group's success, to avoid leaking the queue and thread in case of unsuccessful close operations.","created_at":"2018-02-27T21:02:31Z","updated_at":"2018-02-28T03:22:55Z","closed_at":"2018-02-28T03:22:55Z","merged_at":"2018-02-28T03:22:55Z","merge_commit_sha":"7dfcca99af726ffaf10ddb40d316625a0bf83a9b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc-swift/pulls/149/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc-swift/pulls/149/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc-swift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc-swift/issues/149/comments","statuses_url":"https://api.github.com/repos/grpc/grpc-swift/statuses/303f237169405c0ffa5d9be13b05b81860277715","head":{"label":"MrMage:call-shutdown-server-side","ref":"call-shutdown-server-side","sha":"303f237169405c0ffa5d9be13b05b81860277715","user":{"login":"MrMage","id":117466,"avatar_url":"https://avatars1.githubusercontent.com/u/117466?v=4","gravatar_id":"","url":"https://api.github.com/users/MrMage","html_url":"https://github.com/MrMage","followers_url":"https://api.github.com/users/MrMage/followers","following_url":"https://api.github.com/users/MrMage/following{/other_user}","gists_url":"https://api.github.com/users/MrMage/gists{/gist_id}","starred_url":"https://api.github.com/users/MrMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrMage/subscriptions","organizations_url":"https://api.github.com/users/MrMage/orgs","repos_url":"https://api.github.com/users/MrMage/repos","events_url":"https://api.github.com/users/MrMage/events{/privacy}","received_events_url":"https://api.github.com/users/MrMage/received_events","type":"User","site_admin":false},"repo":{"id":122057004,"name":"grpc-swift","full_name":"MrMage/grpc-swift","owner":{"login":"MrMage","id":117466,"avatar_url":"https://avatars1.githubusercontent.com/u/117466?v=4","gravatar_id":"","url":"https://api.github.com/users/MrMage","html_url":"https://github.com/MrMage","followers_url":"https://api.github.com/users/MrMage/followers","following_url":"https://api.github.com/users/MrMage/following{/other_user}","gists_url":"https://api.github.com/users/MrMage/gists{/gist_id}","starred_url":"https://api.github.com/users/MrMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrMage/subscriptions","organizations_url":"https://api.github.com/users/MrMage/orgs","repos_url":"https://api.github.com/users/MrMage/repos","events_url":"https://api.github.com/users/MrMage/events{/privacy}","received_events_url":"https://api.github.com/users/MrMage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MrMage/grpc-swift","description":"The Swift language implementation of gRPC.","fork":true,"url":"https://api.github.com/repos/MrMage/grpc-swift","forks_url":"https://api.github.com/repos/MrMage/grpc-swift/forks","keys_url":"https://api.github.com/repos/MrMage/grpc-swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MrMage/grpc-swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MrMage/grpc-swift/teams","hooks_url":"https://api.github.com/repos/MrMage/grpc-swift/hooks","issue_events_url":"https://api.github.com/repos/MrMage/grpc-swift/issues/events{/number}","events_url":"https://api.github.com/repos/MrMage/grpc-swift/events","assignees_url":"https://api.github.com/repos/MrMage/grpc-swift/assignees{/user}","branches_url":"https://api.github.com/repos/MrMage/grpc-swift/branches{/branch}","tags_url":"https://api.github.com/repos/MrMage/grpc-swift/tags","blobs_url":"https://api.github.com/repos/MrMage/grpc-swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MrMage/grpc-swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MrMage/grpc-swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/MrMage/grpc-swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MrMage/grpc-swift/statuses/{sha}","languages_url":"https://api.github.com/repos/MrMage/grpc-swift/languages","stargazers_url":"https://api.github.com/repos/MrMage/grpc-swift/stargazers","contributors_url":"https://api.github.com/repos/MrMage/grpc-swift/contributors","subscribers_url":"https://api.github.com/repos/MrMage/grpc-swift/subscribers","subscription_url":"https://api.github.com/repos/MrMage/grpc-swift/subscription","commits_url":"https://api.github.com/repos/MrMage/grpc-swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/MrMage/grpc-swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/MrMage/grpc-swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/MrMage/grpc-swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/MrMage/grpc-swift/contents/{+path}","compare_url":"https://api.github.com/repos/MrMage/grpc-swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MrMage/grpc-swift/merges","archive_url":"https://api.github.com/repos/MrMage/grpc-swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MrMage/grpc-swift/downloads","issues_url":"https://api.github.com/repos/MrMage/grpc-swift/issues{/number}","pulls_url":"https://api.github.com/repos/MrMage/grpc-swift/pulls{/number}","milestones_url":"https://api.github.com/repos/MrMage/grpc-swift/milestones{/number}","notifications_url":"https://api.github.com/repos/MrMage/grpc-swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MrMage/grpc-swift/labels{/name}","releases_url":"https://api.github.com/repos/MrMage/grpc-swift/releases{/id}","deployments_url":"https://api.github.com/repos/MrMage/grpc-swift/deployments","created_at":"2018-02-19T12:07:46Z","updated_at":"2018-02-19T12:07:52Z","pushed_at":"2018-02-27T21:02:08Z","git_url":"git://github.com/MrMage/grpc-swift.git","ssh_url":"git@github.com:MrMage/grpc-swift.git","clone_url":"https://github.com/MrMage/grpc-swift.git","svn_url":"https://github.com/MrMage/grpc-swift","homepage":"","size":5532,"stargazers_count":0,"watchers_count":0,"language":"C","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"3602c874d7d72af414fc2d22bc98baf0e2498f88","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars1.githubusercontent.com/u/7802525?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":68841963,"name":"grpc-swift","full_name":"grpc/grpc-swift","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars1.githubusercontent.com/u/7802525?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc-swift","description":"The Swift language implementation of gRPC.","fork":false,"url":"https://api.github.com/repos/grpc/grpc-swift","forks_url":"https://api.github.com/repos/grpc/grpc-swift/forks","keys_url":"https://api.github.com/repos/grpc/grpc-swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc-swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc-swift/teams","hooks_url":"https://api.github.com/repos/grpc/grpc-swift/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc-swift/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc-swift/events","assignees_url":"https://api.github.com/repos/grpc/grpc-swift/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc-swift/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc-swift/tags","blobs_url":"https://api.github.com/repos/grpc/grpc-swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc-swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc-swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc-swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc-swift/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc-swift/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc-swift/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc-swift/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc-swift/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc-swift/subscription","commits_url":"https://api.github.com/repos/grpc/grpc-swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc-swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc-swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc-swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc-swift/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc-swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc-swift/merges","archive_url":"https://api.github.com/repos/grpc/grpc-swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc-swift/downloads","issues_url":"https://api.github.com/repos/grpc/grpc-swift/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc-swift/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc-swift/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc-swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc-swift/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc-swift/releases{/id}","deployments_url":"https://api.github.com/repos/grpc/grpc-swift/deployments","created_at":"2016-09-21T17:35:31Z","updated_at":"2018-02-27T08:24:17Z","pushed_at":"2018-02-28T03:22:55Z","git_url":"git://github.com/grpc/grpc-swift.git","ssh_url":"git@github.com:grpc/grpc-swift.git","clone_url":"https://github.com/grpc/grpc-swift.git","svn_url":"https://github.com/grpc/grpc-swift","homepage":"","size":5520,"stargazers_count":338,"watchers_count":338,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":76,"open_issues":53,"watchers":338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc-swift/pulls/149"},"html":{"href":"https://github.com/grpc/grpc-swift/pull/149"},"issue":{"href":"https://api.github.com/repos/grpc/grpc-swift/issues/149"},"comments":{"href":"https://api.github.com/repos/grpc/grpc-swift/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc-swift/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc-swift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc-swift/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc-swift/statuses/303f237169405c0ffa5d9be13b05b81860277715"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"timburks","id":405,"avatar_url":"https://avatars3.githubusercontent.com/u/405?v=4","gravatar_id":"","url":"https://api.github.com/users/timburks","html_url":"https://github.com/timburks","followers_url":"https://api.github.com/users/timburks/followers","following_url":"https://api.github.com/users/timburks/following{/other_user}","gists_url":"https://api.github.com/users/timburks/gists{/gist_id}","starred_url":"https://api.github.com/users/timburks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timburks/subscriptions","organizations_url":"https://api.github.com/users/timburks/orgs","repos_url":"https://api.github.com/users/timburks/repos","events_url":"https://api.github.com/users/timburks/events{/privacy}","received_events_url":"https://api.github.com/users/timburks/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":6,"changed_files":1}}
{"actor":{"display_login":"timburks"}}