{"action":"created","comment":{"url":"https://api.github.com/repos/pika/pika/pulls/comments/168548412","pull_request_review_id":96935344,"id":168548412,"diff_hunk":"@@ -1267,9 +1269,40 @@ def _on_synchronous_complete(self, _method_frame_unused):\n         \"\"\"\n         LOGGER.debug('%i blocked frames', len(self._blocked))\n         self._blocking = None\n+        # self._blocking must be checked here as a callback could\n+        # potentially change the state of that variable during an\n+        # iteration of the while loop\n         while self._blocked and self._blocking is None:\n             self._rpc(*self._blocked.popleft())\n \n+    def _drain_blocked_methods_on_remote_close(self):\n+        \"\"\"This is called when the broker sends a Channel.Close while the\n+        client is in CLOSING state. This method checks the blocked method\n+        queue for a pending client-initiated Channel.Close method and\n+        ensures its callbacks are processed, but does send the method to","path":"pika/channel.py","position":55,"original_position":55,"commit_id":"bbcd4775d66852a717e1eeb817f0ab776a5ac438","original_commit_id":"bbcd4775d66852a717e1eeb817f0ab776a5ac438","user":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars2.githubusercontent.com/u/1441066?v=4","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"body":"Should be \"but does \\*not\\* send\"","created_at":"2018-02-15T17:25:39Z","updated_at":"2018-02-15T17:43:07Z","html_url":"https://github.com/pika/pika/pull/957#discussion_r168548412","pull_request_url":"https://api.github.com/repos/pika/pika/pulls/957","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pika/pika/pulls/comments/168548412"},"html":{"href":"https://github.com/pika/pika/pull/957#discussion_r168548412"},"pull_request":{"href":"https://api.github.com/repos/pika/pika/pulls/957"}}},"pull_request":{"url":"https://api.github.com/repos/pika/pika/pulls/957","id":169159338,"html_url":"https://github.com/pika/pika/pull/957","diff_url":"https://github.com/pika/pika/pull/957.diff","patch_url":"https://github.com/pika/pika/pull/957.patch","issue_url":"https://api.github.com/repos/pika/pika/issues/957","number":957,"state":"open","locked":false,"title":"Ensure blocked Channel.Close methods are processed","user":{"login":"lukebakken","id":514926,"avatar_url":"https://avatars2.githubusercontent.com/u/514926?v=4","gravatar_id":"","url":"https://api.github.com/users/lukebakken","html_url":"https://github.com/lukebakken","followers_url":"https://api.github.com/users/lukebakken/followers","following_url":"https://api.github.com/users/lukebakken/following{/other_user}","gists_url":"https://api.github.com/users/lukebakken/gists{/gist_id}","starred_url":"https://api.github.com/users/lukebakken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukebakken/subscriptions","organizations_url":"https://api.github.com/users/lukebakken/orgs","repos_url":"https://api.github.com/users/lukebakken/repos","events_url":"https://api.github.com/users/lukebakken/events{/privacy}","received_events_url":"https://api.github.com/users/lukebakken/received_events","type":"User","site_admin":false},"body":"If Pika receives a server-initiated Channel.Close method, it will not process blocked Channel.Close methods which could hang application code.\r\n\r\nSee https://gist.github.com/lukebakken/ab49531e504dfd8f4c133fcb9994a7d7#file-testpika-py for code to reproduce.\r\n\r\nFixes #945","created_at":"2018-02-14T16:33:22Z","updated_at":"2018-02-15T17:43:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87c90c3e32085a112be0d6b0882a26590bdac912","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/pika/pika/milestones/8","html_url":"https://github.com/pika/pika/milestone/8","labels_url":"https://api.github.com/repos/pika/pika/milestones/8/labels","id":2664000,"number":8,"title":"1.0.0","description":"","creator":{"login":"lukebakken","id":514926,"avatar_url":"https://avatars2.githubusercontent.com/u/514926?v=4","gravatar_id":"","url":"https://api.github.com/users/lukebakken","html_url":"https://github.com/lukebakken","followers_url":"https://api.github.com/users/lukebakken/followers","following_url":"https://api.github.com/users/lukebakken/following{/other_user}","gists_url":"https://api.github.com/users/lukebakken/gists{/gist_id}","starred_url":"https://api.github.com/users/lukebakken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukebakken/subscriptions","organizations_url":"https://api.github.com/users/lukebakken/orgs","repos_url":"https://api.github.com/users/lukebakken/repos","events_url":"https://api.github.com/users/lukebakken/events{/privacy}","received_events_url":"https://api.github.com/users/lukebakken/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":38,"state":"open","created_at":"2017-07-26T21:40:33Z","updated_at":"2018-02-15T13:22:54Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/pika/pika/pulls/957/commits","review_comments_url":"https://api.github.com/repos/pika/pika/pulls/957/comments","review_comment_url":"https://api.github.com/repos/pika/pika/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pika/pika/issues/957/comments","statuses_url":"https://api.github.com/repos/pika/pika/statuses/bbcd4775d66852a717e1eeb817f0ab776a5ac438","head":{"label":"pika:pika-945","ref":"pika-945","sha":"bbcd4775d66852a717e1eeb817f0ab776a5ac438","user":{"login":"pika","id":660428,"avatar_url":"https://avatars3.githubusercontent.com/u/660428?v=4","gravatar_id":"","url":"https://api.github.com/users/pika","html_url":"https://github.com/pika","followers_url":"https://api.github.com/users/pika/followers","following_url":"https://api.github.com/users/pika/following{/other_user}","gists_url":"https://api.github.com/users/pika/gists{/gist_id}","starred_url":"https://api.github.com/users/pika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pika/subscriptions","organizations_url":"https://api.github.com/users/pika/orgs","repos_url":"https://api.github.com/users/pika/repos","events_url":"https://api.github.com/users/pika/events{/privacy}","received_events_url":"https://api.github.com/users/pika/received_events","type":"Organization","site_admin":false},"repo":{"id":342869,"name":"pika","full_name":"pika/pika","owner":{"login":"pika","id":660428,"avatar_url":"https://avatars3.githubusercontent.com/u/660428?v=4","gravatar_id":"","url":"https://api.github.com/users/pika","html_url":"https://github.com/pika","followers_url":"https://api.github.com/users/pika/followers","following_url":"https://api.github.com/users/pika/following{/other_user}","gists_url":"https://api.github.com/users/pika/gists{/gist_id}","starred_url":"https://api.github.com/users/pika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pika/subscriptions","organizations_url":"https://api.github.com/users/pika/orgs","repos_url":"https://api.github.com/users/pika/repos","events_url":"https://api.github.com/users/pika/events{/privacy}","received_events_url":"https://api.github.com/users/pika/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pika/pika","description":"Pure Python RabbitMQ/AMQP 0-9-1 client library","fork":false,"url":"https://api.github.com/repos/pika/pika","forks_url":"https://api.github.com/repos/pika/pika/forks","keys_url":"https://api.github.com/repos/pika/pika/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pika/pika/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pika/pika/teams","hooks_url":"https://api.github.com/repos/pika/pika/hooks","issue_events_url":"https://api.github.com/repos/pika/pika/issues/events{/number}","events_url":"https://api.github.com/repos/pika/pika/events","assignees_url":"https://api.github.com/repos/pika/pika/assignees{/user}","branches_url":"https://api.github.com/repos/pika/pika/branches{/branch}","tags_url":"https://api.github.com/repos/pika/pika/tags","blobs_url":"https://api.github.com/repos/pika/pika/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pika/pika/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pika/pika/git/refs{/sha}","trees_url":"https://api.github.com/repos/pika/pika/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pika/pika/statuses/{sha}","languages_url":"https://api.github.com/repos/pika/pika/languages","stargazers_url":"https://api.github.com/repos/pika/pika/stargazers","contributors_url":"https://api.github.com/repos/pika/pika/contributors","subscribers_url":"https://api.github.com/repos/pika/pika/subscribers","subscription_url":"https://api.github.com/repos/pika/pika/subscription","commits_url":"https://api.github.com/repos/pika/pika/commits{/sha}","git_commits_url":"https://api.github.com/repos/pika/pika/git/commits{/sha}","comments_url":"https://api.github.com/repos/pika/pika/comments{/number}","issue_comment_url":"https://api.github.com/repos/pika/pika/issues/comments{/number}","contents_url":"https://api.github.com/repos/pika/pika/contents/{+path}","compare_url":"https://api.github.com/repos/pika/pika/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pika/pika/merges","archive_url":"https://api.github.com/repos/pika/pika/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pika/pika/downloads","issues_url":"https://api.github.com/repos/pika/pika/issues{/number}","pulls_url":"https://api.github.com/repos/pika/pika/pulls{/number}","milestones_url":"https://api.github.com/repos/pika/pika/milestones{/number}","notifications_url":"https://api.github.com/repos/pika/pika/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pika/pika/labels{/name}","releases_url":"https://api.github.com/repos/pika/pika/releases{/id}","deployments_url":"https://api.github.com/repos/pika/pika/deployments","created_at":"2009-10-19T23:22:02Z","updated_at":"2018-02-15T14:26:34Z","pushed_at":"2018-02-15T14:04:22Z","git_url":"git://github.com/pika/pika.git","ssh_url":"git@github.com:pika/pika.git","clone_url":"https://github.com/pika/pika.git","svn_url":"https://github.com/pika/pika","homepage":"https://pika.readthedocs.io","size":5844,"stargazers_count":1508,"watchers_count":1508,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":469,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":469,"open_issues":30,"watchers":1508,"default_branch":"master"}},"base":{"label":"pika:master","ref":"master","sha":"9acd7684132d03581715518a72d027b70f3954ea","user":{"login":"pika","id":660428,"avatar_url":"https://avatars3.githubusercontent.com/u/660428?v=4","gravatar_id":"","url":"https://api.github.com/users/pika","html_url":"https://github.com/pika","followers_url":"https://api.github.com/users/pika/followers","following_url":"https://api.github.com/users/pika/following{/other_user}","gists_url":"https://api.github.com/users/pika/gists{/gist_id}","starred_url":"https://api.github.com/users/pika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pika/subscriptions","organizations_url":"https://api.github.com/users/pika/orgs","repos_url":"https://api.github.com/users/pika/repos","events_url":"https://api.github.com/users/pika/events{/privacy}","received_events_url":"https://api.github.com/users/pika/received_events","type":"Organization","site_admin":false},"repo":{"id":342869,"name":"pika","full_name":"pika/pika","owner":{"login":"pika","id":660428,"avatar_url":"https://avatars3.githubusercontent.com/u/660428?v=4","gravatar_id":"","url":"https://api.github.com/users/pika","html_url":"https://github.com/pika","followers_url":"https://api.github.com/users/pika/followers","following_url":"https://api.github.com/users/pika/following{/other_user}","gists_url":"https://api.github.com/users/pika/gists{/gist_id}","starred_url":"https://api.github.com/users/pika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pika/subscriptions","organizations_url":"https://api.github.com/users/pika/orgs","repos_url":"https://api.github.com/users/pika/repos","events_url":"https://api.github.com/users/pika/events{/privacy}","received_events_url":"https://api.github.com/users/pika/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pika/pika","description":"Pure Python RabbitMQ/AMQP 0-9-1 client library","fork":false,"url":"https://api.github.com/repos/pika/pika","forks_url":"https://api.github.com/repos/pika/pika/forks","keys_url":"https://api.github.com/repos/pika/pika/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pika/pika/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pika/pika/teams","hooks_url":"https://api.github.com/repos/pika/pika/hooks","issue_events_url":"https://api.github.com/repos/pika/pika/issues/events{/number}","events_url":"https://api.github.com/repos/pika/pika/events","assignees_url":"https://api.github.com/repos/pika/pika/assignees{/user}","branches_url":"https://api.github.com/repos/pika/pika/branches{/branch}","tags_url":"https://api.github.com/repos/pika/pika/tags","blobs_url":"https://api.github.com/repos/pika/pika/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pika/pika/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pika/pika/git/refs{/sha}","trees_url":"https://api.github.com/repos/pika/pika/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pika/pika/statuses/{sha}","languages_url":"https://api.github.com/repos/pika/pika/languages","stargazers_url":"https://api.github.com/repos/pika/pika/stargazers","contributors_url":"https://api.github.com/repos/pika/pika/contributors","subscribers_url":"https://api.github.com/repos/pika/pika/subscribers","subscription_url":"https://api.github.com/repos/pika/pika/subscription","commits_url":"https://api.github.com/repos/pika/pika/commits{/sha}","git_commits_url":"https://api.github.com/repos/pika/pika/git/commits{/sha}","comments_url":"https://api.github.com/repos/pika/pika/comments{/number}","issue_comment_url":"https://api.github.com/repos/pika/pika/issues/comments{/number}","contents_url":"https://api.github.com/repos/pika/pika/contents/{+path}","compare_url":"https://api.github.com/repos/pika/pika/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pika/pika/merges","archive_url":"https://api.github.com/repos/pika/pika/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pika/pika/downloads","issues_url":"https://api.github.com/repos/pika/pika/issues{/number}","pulls_url":"https://api.github.com/repos/pika/pika/pulls{/number}","milestones_url":"https://api.github.com/repos/pika/pika/milestones{/number}","notifications_url":"https://api.github.com/repos/pika/pika/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pika/pika/labels{/name}","releases_url":"https://api.github.com/repos/pika/pika/releases{/id}","deployments_url":"https://api.github.com/repos/pika/pika/deployments","created_at":"2009-10-19T23:22:02Z","updated_at":"2018-02-15T14:26:34Z","pushed_at":"2018-02-15T14:04:22Z","git_url":"git://github.com/pika/pika.git","ssh_url":"git@github.com:pika/pika.git","clone_url":"https://github.com/pika/pika.git","svn_url":"https://github.com/pika/pika","homepage":"https://pika.readthedocs.io","size":5844,"stargazers_count":1508,"watchers_count":1508,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":469,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":469,"open_issues":30,"watchers":1508,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pika/pika/pulls/957"},"html":{"href":"https://github.com/pika/pika/pull/957"},"issue":{"href":"https://api.github.com/repos/pika/pika/issues/957"},"comments":{"href":"https://api.github.com/repos/pika/pika/issues/957/comments"},"review_comments":{"href":"https://api.github.com/repos/pika/pika/pulls/957/comments"},"review_comment":{"href":"https://api.github.com/repos/pika/pika/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pika/pika/pulls/957/commits"},"statuses":{"href":"https://api.github.com/repos/pika/pika/statuses/bbcd4775d66852a717e1eeb817f0ab776a5ac438"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vitaly-krugl"}}