{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc-go/pulls/comments/53073052","id":53073052,"diff_hunk":"@@ -319,7 +320,16 @@ func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream)) {\n \t\t\t\ts.buf.put(&recvMsg{data: buf[:n]})\n \t\t\t}\n \t\t\tif err != nil {\n-\t\t\t\ts.buf.put(&recvMsg{err: err})\n+\t\t\t\tif err, ok := err.(http2.StreamError); ok {\n+\t\t\t\t\tcode := http2ErrConvTab[err.Code]\n+\t\t\t\t\tif code == codes.OK {\n+\t\t\t\t\t\ts.buf.put(&recvMsg{err: io.EOF})\n+\t\t\t\t\t} else {\n+\t\t\t\t\t\ts.buf.put(&recvMsg{err: StreamErrorf(code, \"%v\", err)})\n+\t\t\t\t\t}\n+\t\t\t\t} else {\n+\t\t\t\t\ts.buf.put(&recvMsg{err: io.EOF})","path":"transport/handler_server.go","position":21,"original_position":21,"commit_id":"51cc3e8a89d2b9bd88843e1e4b7e2302c247e6ca","original_commit_id":"51cc3e8a89d2b9bd88843e1e4b7e2302c247e6ca","user":{"login":"iamqizhao","id":10121772,"avatar_url":"https://avatars.githubusercontent.com/u/10121772?v=3","gravatar_id":"","url":"https://api.github.com/users/iamqizhao","html_url":"https://github.com/iamqizhao","followers_url":"https://api.github.com/users/iamqizhao/followers","following_url":"https://api.github.com/users/iamqizhao/following{/other_user}","gists_url":"https://api.github.com/users/iamqizhao/gists{/gist_id}","starred_url":"https://api.github.com/users/iamqizhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamqizhao/subscriptions","organizations_url":"https://api.github.com/users/iamqizhao/orgs","repos_url":"https://api.github.com/users/iamqizhao/repos","events_url":"https://api.github.com/users/iamqizhao/events{/privacy}","received_events_url":"https://api.github.com/users/iamqizhao/received_events","type":"User","site_admin":false},"body":"@bradfitz \r\n\r\nI observed some strange behavior here from http2 package. In some end2end tests (e.g., TestPingPong_4), this branch is entered when err is non-nil with \"stream error: stream ID 0; NO_ERROR\" and its type is not http2.StreamError. And the expected status in the test is OK (i.e., io.EOF). Here I forced it return a success (i.e., io.EOF). But this sounds strange to me and I am not sure it is the right thing to do. Can you take a look?","created_at":"2016-02-16T20:28:02Z","updated_at":"2016-02-16T20:28:02Z","html_url":"https://github.com/grpc/grpc-go/pull/557#discussion_r53073052","pull_request_url":"https://api.github.com/repos/grpc/grpc-go/pulls/557","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc-go/pulls/comments/53073052"},"html":{"href":"https://github.com/grpc/grpc-go/pull/557#discussion_r53073052"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc-go/pulls/557"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc-go/pulls/557","id":59540378,"html_url":"https://github.com/grpc/grpc-go/pull/557","diff_url":"https://github.com/grpc/grpc-go/pull/557.diff","patch_url":"https://github.com/grpc/grpc-go/pull/557.patch","issue_url":"https://api.github.com/repos/grpc/grpc-go/issues/557","number":557,"state":"open","locked":false,"title":"Convert http2.StreamError to transport.StreamError in the handler transport impl","user":{"login":"iamqizhao","id":10121772,"avatar_url":"https://avatars.githubusercontent.com/u/10121772?v=3","gravatar_id":"","url":"https://api.github.com/users/iamqizhao","html_url":"https://github.com/iamqizhao","followers_url":"https://api.github.com/users/iamqizhao/followers","following_url":"https://api.github.com/users/iamqizhao/following{/other_user}","gists_url":"https://api.github.com/users/iamqizhao/gists{/gist_id}","starred_url":"https://api.github.com/users/iamqizhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamqizhao/subscriptions","organizations_url":"https://api.github.com/users/iamqizhao/orgs","repos_url":"https://api.github.com/users/iamqizhao/repos","events_url":"https://api.github.com/users/iamqizhao/events{/privacy}","received_events_url":"https://api.github.com/users/iamqizhao/received_events","type":"User","site_admin":false},"body":"fixes the flaky tests observed at https://travis-ci.org/grpc/grpc-go/builds/108934236.","created_at":"2016-02-16T19:24:18Z","updated_at":"2016-02-16T20:28:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a6a313523495ab8ee11a5a7b7344348c6d1a90d","assignee":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc-go/pulls/557/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc-go/pulls/557/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc-go/issues/557/comments","statuses_url":"https://api.github.com/repos/grpc/grpc-go/statuses/51cc3e8a89d2b9bd88843e1e4b7e2302c247e6ca","head":{"label":"iamqizhao:master","ref":"master","sha":"51cc3e8a89d2b9bd88843e1e4b7e2302c247e6ca","user":{"login":"iamqizhao","id":10121772,"avatar_url":"https://avatars.githubusercontent.com/u/10121772?v=3","gravatar_id":"","url":"https://api.github.com/users/iamqizhao","html_url":"https://github.com/iamqizhao","followers_url":"https://api.github.com/users/iamqizhao/followers","following_url":"https://api.github.com/users/iamqizhao/following{/other_user}","gists_url":"https://api.github.com/users/iamqizhao/gists{/gist_id}","starred_url":"https://api.github.com/users/iamqizhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamqizhao/subscriptions","organizations_url":"https://api.github.com/users/iamqizhao/orgs","repos_url":"https://api.github.com/users/iamqizhao/repos","events_url":"https://api.github.com/users/iamqizhao/events{/privacy}","received_events_url":"https://api.github.com/users/iamqizhao/received_events","type":"User","site_admin":false},"repo":{"id":31390988,"name":"grpc-go","full_name":"iamqizhao/grpc-go","owner":{"login":"iamqizhao","id":10121772,"avatar_url":"https://avatars.githubusercontent.com/u/10121772?v=3","gravatar_id":"","url":"https://api.github.com/users/iamqizhao","html_url":"https://github.com/iamqizhao","followers_url":"https://api.github.com/users/iamqizhao/followers","following_url":"https://api.github.com/users/iamqizhao/following{/other_user}","gists_url":"https://api.github.com/users/iamqizhao/gists{/gist_id}","starred_url":"https://api.github.com/users/iamqizhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamqizhao/subscriptions","organizations_url":"https://api.github.com/users/iamqizhao/orgs","repos_url":"https://api.github.com/users/iamqizhao/repos","events_url":"https://api.github.com/users/iamqizhao/events{/privacy}","received_events_url":"https://api.github.com/users/iamqizhao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamqizhao/grpc-go","description":"The Go language implementation of gRPC. HTTP/2 based RPC","fork":true,"url":"https://api.github.com/repos/iamqizhao/grpc-go","forks_url":"https://api.github.com/repos/iamqizhao/grpc-go/forks","keys_url":"https://api.github.com/repos/iamqizhao/grpc-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamqizhao/grpc-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamqizhao/grpc-go/teams","hooks_url":"https://api.github.com/repos/iamqizhao/grpc-go/hooks","issue_events_url":"https://api.github.com/repos/iamqizhao/grpc-go/issues/events{/number}","events_url":"https://api.github.com/repos/iamqizhao/grpc-go/events","assignees_url":"https://api.github.com/repos/iamqizhao/grpc-go/assignees{/user}","branches_url":"https://api.github.com/repos/iamqizhao/grpc-go/branches{/branch}","tags_url":"https://api.github.com/repos/iamqizhao/grpc-go/tags","blobs_url":"https://api.github.com/repos/iamqizhao/grpc-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamqizhao/grpc-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamqizhao/grpc-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamqizhao/grpc-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamqizhao/grpc-go/statuses/{sha}","languages_url":"https://api.github.com/repos/iamqizhao/grpc-go/languages","stargazers_url":"https://api.github.com/repos/iamqizhao/grpc-go/stargazers","contributors_url":"https://api.github.com/repos/iamqizhao/grpc-go/contributors","subscribers_url":"https://api.github.com/repos/iamqizhao/grpc-go/subscribers","subscription_url":"https://api.github.com/repos/iamqizhao/grpc-go/subscription","commits_url":"https://api.github.com/repos/iamqizhao/grpc-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamqizhao/grpc-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamqizhao/grpc-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamqizhao/grpc-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamqizhao/grpc-go/contents/{+path}","compare_url":"https://api.github.com/repos/iamqizhao/grpc-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamqizhao/grpc-go/merges","archive_url":"https://api.github.com/repos/iamqizhao/grpc-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamqizhao/grpc-go/downloads","issues_url":"https://api.github.com/repos/iamqizhao/grpc-go/issues{/number}","pulls_url":"https://api.github.com/repos/iamqizhao/grpc-go/pulls{/number}","milestones_url":"https://api.github.com/repos/iamqizhao/grpc-go/milestones{/number}","notifications_url":"https://api.github.com/repos/iamqizhao/grpc-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamqizhao/grpc-go/labels{/name}","releases_url":"https://api.github.com/repos/iamqizhao/grpc-go/releases{/id}","deployments_url":"https://api.github.com/repos/iamqizhao/grpc-go/deployments","created_at":"2015-02-26T21:58:15Z","updated_at":"2016-01-14T20:24:27Z","pushed_at":"2016-02-16T20:17:53Z","git_url":"git://github.com/iamqizhao/grpc-go.git","ssh_url":"git@github.com:iamqizhao/grpc-go.git","clone_url":"https://github.com/iamqizhao/grpc-go.git","svn_url":"https://github.com/iamqizhao/grpc-go","homepage":"","size":1456,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"01de3de50a4fada34ce39322801a1533c9554cdc","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","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":27729907,"name":"grpc-go","full_name":"grpc/grpc-go","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","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-go","description":"The Go language implementation of gRPC. HTTP/2 based RPC","fork":false,"url":"https://api.github.com/repos/grpc/grpc-go","forks_url":"https://api.github.com/repos/grpc/grpc-go/forks","keys_url":"https://api.github.com/repos/grpc/grpc-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc-go/teams","hooks_url":"https://api.github.com/repos/grpc/grpc-go/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc-go/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc-go/events","assignees_url":"https://api.github.com/repos/grpc/grpc-go/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc-go/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc-go/tags","blobs_url":"https://api.github.com/repos/grpc/grpc-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc-go/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc-go/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc-go/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc-go/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc-go/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc-go/subscription","commits_url":"https://api.github.com/repos/grpc/grpc-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc-go/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc-go/merges","archive_url":"https://api.github.com/repos/grpc/grpc-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc-go/downloads","issues_url":"https://api.github.com/repos/grpc/grpc-go/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc-go/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc-go/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc-go/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc-go/releases{/id}","deployments_url":"https://api.github.com/repos/grpc/grpc-go/deployments","created_at":"2014-12-08T18:59:34Z","updated_at":"2016-02-15T22:54:19Z","pushed_at":"2016-02-16T20:17:54Z","git_url":"git://github.com/grpc/grpc-go.git","ssh_url":"git@github.com:grpc/grpc-go.git","clone_url":"https://github.com/grpc/grpc-go.git","svn_url":"https://github.com/grpc/grpc-go","homepage":"","size":2028,"stargazers_count":1475,"watchers_count":1475,"language":"Go","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":200,"mirror_url":null,"open_issues_count":44,"forks":200,"open_issues":44,"watchers":1475,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc-go/pulls/557"},"html":{"href":"https://github.com/grpc/grpc-go/pull/557"},"issue":{"href":"https://api.github.com/repos/grpc/grpc-go/issues/557"},"comments":{"href":"https://api.github.com/repos/grpc/grpc-go/issues/557/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc-go/pulls/557/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc-go/pulls/557/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc-go/statuses/51cc3e8a89d2b9bd88843e1e4b7e2302c247e6ca"}}}}