{"action":"created","comment":{"url":"https://api.github.com/repos/dart-lang/http2/pulls/comments/229710077","pull_request_review_id":170272502,"id":229710077,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTcxMDA3Nw==","diff_hunk":"@@ -330,6 +330,17 @@ class StreamHandler extends Object with TerminatableMixin, ClosableMixin {\n \n     _setupOutgoingMessageHandling(stream);\n \n+    // handle incoming stream cancellation. RST is only sent when streamQueueOut\n+    // has been closed because RST make the stream 'closed'.\n+    streamQueueIn.onCancel.then((_) {\n+      if (streamQueueIn.wasCancelled &&\n+          !streamQueueIn.wasClosed &&\n+          !streamQueueIn.wasTerminated &&\n+          (streamQueueOut.wasClosed || streamQueueOut.wasTerminated)) {\n+        _frameWriter.writeRstStreamFrame(streamId, ErrorCode.CANCEL);","path":"lib/src/streams/stream_handler.dart","position":11,"original_position":11,"commit_id":"539b5287f8afcbaf2367037dca10b9f27963f4fa","original_commit_id":"539b5287f8afcbaf2367037dca10b9f27963f4fa","user":{"login":"a14n","id":1206632,"node_id":"MDQ6VXNlcjEyMDY2MzI=","avatar_url":"https://avatars1.githubusercontent.com/u/1206632?v=4","gravatar_id":"","url":"https://api.github.com/users/a14n","html_url":"https://github.com/a14n","followers_url":"https://api.github.com/users/a14n/followers","following_url":"https://api.github.com/users/a14n/following{/other_user}","gists_url":"https://api.github.com/users/a14n/gists{/gist_id}","starred_url":"https://api.github.com/users/a14n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a14n/subscriptions","organizations_url":"https://api.github.com/users/a14n/orgs","repos_url":"https://api.github.com/users/a14n/repos","events_url":"https://api.github.com/users/a14n/events{/privacy}","received_events_url":"https://api.github.com/users/a14n/received_events","type":"User","site_admin":false},"body":"According to https://http2.github.io/http2-spec/#StreamStates it is allowed to send R after ES. I will update the code to allow that.","created_at":"2018-10-31T14:13:01Z","updated_at":"2018-10-31T14:13:01Z","html_url":"https://github.com/dart-lang/http2/pull/35#discussion_r229710077","pull_request_url":"https://api.github.com/repos/dart-lang/http2/pulls/35","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/http2/pulls/comments/229710077"},"html":{"href":"https://github.com/dart-lang/http2/pull/35#discussion_r229710077"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/http2/pulls/35"}},"in_reply_to_id":229684728},"pull_request":{"url":"https://api.github.com/repos/dart-lang/http2/pulls/35","id":226610119,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NjEwMTE5","html_url":"https://github.com/dart-lang/http2/pull/35","diff_url":"https://github.com/dart-lang/http2/pull/35.diff","patch_url":"https://github.com/dart-lang/http2/pull/35.patch","issue_url":"https://api.github.com/repos/dart-lang/http2/issues/35","number":35,"state":"open","locked":false,"title":"discard messages incoming after stream cancellation","user":{"login":"a14n","id":1206632,"node_id":"MDQ6VXNlcjEyMDY2MzI=","avatar_url":"https://avatars1.githubusercontent.com/u/1206632?v=4","gravatar_id":"","url":"https://api.github.com/users/a14n","html_url":"https://github.com/a14n","followers_url":"https://api.github.com/users/a14n/followers","following_url":"https://api.github.com/users/a14n/following{/other_user}","gists_url":"https://api.github.com/users/a14n/gists{/gist_id}","starred_url":"https://api.github.com/users/a14n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a14n/subscriptions","organizations_url":"https://api.github.com/users/a14n/orgs","repos_url":"https://api.github.com/users/a14n/repos","events_url":"https://api.github.com/users/a14n/events{/privacy}","received_events_url":"https://api.github.com/users/a14n/received_events","type":"User","site_admin":false},"body":"Fixes #34 ","created_at":"2018-10-29T15:41:49Z","updated_at":"2018-10-31T14:13:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b87cf22986859794d1f9958ff7a50af17c12d2ac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":421017879,"node_id":"MDU6TGFiZWw0MjEwMTc4Nzk=","url":"https://api.github.com/repos/dart-lang/http2/labels/cla:%20yes","name":"cla: yes","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dart-lang/http2/pulls/35/commits","review_comments_url":"https://api.github.com/repos/dart-lang/http2/pulls/35/comments","review_comment_url":"https://api.github.com/repos/dart-lang/http2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dart-lang/http2/issues/35/comments","statuses_url":"https://api.github.com/repos/dart-lang/http2/statuses/539b5287f8afcbaf2367037dca10b9f27963f4fa","head":{"label":"a14n:issue-34","ref":"issue-34","sha":"539b5287f8afcbaf2367037dca10b9f27963f4fa","user":{"login":"a14n","id":1206632,"node_id":"MDQ6VXNlcjEyMDY2MzI=","avatar_url":"https://avatars1.githubusercontent.com/u/1206632?v=4","gravatar_id":"","url":"https://api.github.com/users/a14n","html_url":"https://github.com/a14n","followers_url":"https://api.github.com/users/a14n/followers","following_url":"https://api.github.com/users/a14n/following{/other_user}","gists_url":"https://api.github.com/users/a14n/gists{/gist_id}","starred_url":"https://api.github.com/users/a14n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a14n/subscriptions","organizations_url":"https://api.github.com/users/a14n/orgs","repos_url":"https://api.github.com/users/a14n/repos","events_url":"https://api.github.com/users/a14n/events{/privacy}","received_events_url":"https://api.github.com/users/a14n/received_events","type":"User","site_admin":false},"repo":{"id":154737743,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ3Mzc3NDM=","name":"http2","full_name":"a14n/http2","private":false,"owner":{"login":"a14n","id":1206632,"node_id":"MDQ6VXNlcjEyMDY2MzI=","avatar_url":"https://avatars1.githubusercontent.com/u/1206632?v=4","gravatar_id":"","url":"https://api.github.com/users/a14n","html_url":"https://github.com/a14n","followers_url":"https://api.github.com/users/a14n/followers","following_url":"https://api.github.com/users/a14n/following{/other_user}","gists_url":"https://api.github.com/users/a14n/gists{/gist_id}","starred_url":"https://api.github.com/users/a14n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a14n/subscriptions","organizations_url":"https://api.github.com/users/a14n/orgs","repos_url":"https://api.github.com/users/a14n/repos","events_url":"https://api.github.com/users/a14n/events{/privacy}","received_events_url":"https://api.github.com/users/a14n/received_events","type":"User","site_admin":false},"html_url":"https://github.com/a14n/http2","description":"A HTTP/2 implementation for dart.","fork":true,"url":"https://api.github.com/repos/a14n/http2","forks_url":"https://api.github.com/repos/a14n/http2/forks","keys_url":"https://api.github.com/repos/a14n/http2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a14n/http2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a14n/http2/teams","hooks_url":"https://api.github.com/repos/a14n/http2/hooks","issue_events_url":"https://api.github.com/repos/a14n/http2/issues/events{/number}","events_url":"https://api.github.com/repos/a14n/http2/events","assignees_url":"https://api.github.com/repos/a14n/http2/assignees{/user}","branches_url":"https://api.github.com/repos/a14n/http2/branches{/branch}","tags_url":"https://api.github.com/repos/a14n/http2/tags","blobs_url":"https://api.github.com/repos/a14n/http2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a14n/http2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a14n/http2/git/refs{/sha}","trees_url":"https://api.github.com/repos/a14n/http2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a14n/http2/statuses/{sha}","languages_url":"https://api.github.com/repos/a14n/http2/languages","stargazers_url":"https://api.github.com/repos/a14n/http2/stargazers","contributors_url":"https://api.github.com/repos/a14n/http2/contributors","subscribers_url":"https://api.github.com/repos/a14n/http2/subscribers","subscription_url":"https://api.github.com/repos/a14n/http2/subscription","commits_url":"https://api.github.com/repos/a14n/http2/commits{/sha}","git_commits_url":"https://api.github.com/repos/a14n/http2/git/commits{/sha}","comments_url":"https://api.github.com/repos/a14n/http2/comments{/number}","issue_comment_url":"https://api.github.com/repos/a14n/http2/issues/comments{/number}","contents_url":"https://api.github.com/repos/a14n/http2/contents/{+path}","compare_url":"https://api.github.com/repos/a14n/http2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a14n/http2/merges","archive_url":"https://api.github.com/repos/a14n/http2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a14n/http2/downloads","issues_url":"https://api.github.com/repos/a14n/http2/issues{/number}","pulls_url":"https://api.github.com/repos/a14n/http2/pulls{/number}","milestones_url":"https://api.github.com/repos/a14n/http2/milestones{/number}","notifications_url":"https://api.github.com/repos/a14n/http2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a14n/http2/labels{/name}","releases_url":"https://api.github.com/repos/a14n/http2/releases{/id}","deployments_url":"https://api.github.com/repos/a14n/http2/deployments","created_at":"2018-10-25T21:07:09Z","updated_at":"2018-10-25T21:07:11Z","pushed_at":"2018-10-30T14:35:15Z","git_url":"git://github.com/a14n/http2.git","ssh_url":"git@github.com:a14n/http2.git","clone_url":"https://github.com/a14n/http2.git","svn_url":"https://github.com/a14n/http2","homepage":"https://pub.dartlang.org/packages/http2","size":253,"stargazers_count":0,"watchers_count":0,"language":"Dart","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":"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","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dart-lang:master","ref":"master","sha":"34fc7780a196be782f50c20ccbc333075c7cb8f0","user":{"login":"dart-lang","id":1609975,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDk5NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1609975?v=4","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":32526748,"node_id":"MDEwOlJlcG9zaXRvcnkzMjUyNjc0OA==","name":"http2","full_name":"dart-lang/http2","private":false,"owner":{"login":"dart-lang","id":1609975,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDk5NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1609975?v=4","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dart-lang/http2","description":"A HTTP/2 implementation for dart.","fork":false,"url":"https://api.github.com/repos/dart-lang/http2","forks_url":"https://api.github.com/repos/dart-lang/http2/forks","keys_url":"https://api.github.com/repos/dart-lang/http2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/http2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/http2/teams","hooks_url":"https://api.github.com/repos/dart-lang/http2/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/http2/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/http2/events","assignees_url":"https://api.github.com/repos/dart-lang/http2/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/http2/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/http2/tags","blobs_url":"https://api.github.com/repos/dart-lang/http2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/http2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/http2/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/http2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/http2/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/http2/languages","stargazers_url":"https://api.github.com/repos/dart-lang/http2/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/http2/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/http2/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/http2/subscription","commits_url":"https://api.github.com/repos/dart-lang/http2/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/http2/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/http2/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/http2/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/http2/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/http2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/http2/merges","archive_url":"https://api.github.com/repos/dart-lang/http2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/http2/downloads","issues_url":"https://api.github.com/repos/dart-lang/http2/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/http2/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/http2/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/http2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/http2/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/http2/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/http2/deployments","created_at":"2015-03-19T14:35:51Z","updated_at":"2018-10-28T20:39:02Z","pushed_at":"2018-10-30T14:35:16Z","git_url":"git://github.com/dart-lang/http2.git","ssh_url":"git@github.com:dart-lang/http2.git","clone_url":"https://github.com/dart-lang/http2.git","svn_url":"https://github.com/dart-lang/http2","homepage":"https://pub.dartlang.org/packages/http2","size":248,"stargazers_count":52,"watchers_count":52,"language":"Dart","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":8,"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","node_id":"MDc6TGljZW5zZTU="},"forks":14,"open_issues":8,"watchers":52,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dart-lang/http2/pulls/35"},"html":{"href":"https://github.com/dart-lang/http2/pull/35"},"issue":{"href":"https://api.github.com/repos/dart-lang/http2/issues/35"},"comments":{"href":"https://api.github.com/repos/dart-lang/http2/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/dart-lang/http2/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/dart-lang/http2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dart-lang/http2/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/dart-lang/http2/statuses/539b5287f8afcbaf2367037dca10b9f27963f4fa"}},"author_association":"NONE"}}
{"actor":{"display_login":"a14n"}}