{"action":"created","issue":{"url":"https://api.github.com/repos/micro/go-plugins/issues/183","repository_url":"https://api.github.com/repos/micro/go-plugins","labels_url":"https://api.github.com/repos/micro/go-plugins/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/micro/go-plugins/issues/183/comments","events_url":"https://api.github.com/repos/micro/go-plugins/issues/183/events","html_url":"https://github.com/micro/go-plugins/issues/183","id":324325728,"number":183,"title":"grpc stream can't recv io.EOF","user":{"login":"CandySunPlus","id":502700,"avatar_url":"https://avatars0.githubusercontent.com/u/502700?v=4","gravatar_id":"","url":"https://api.github.com/users/CandySunPlus","html_url":"https://github.com/CandySunPlus","followers_url":"https://api.github.com/users/CandySunPlus/followers","following_url":"https://api.github.com/users/CandySunPlus/following{/other_user}","gists_url":"https://api.github.com/users/CandySunPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/CandySunPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CandySunPlus/subscriptions","organizations_url":"https://api.github.com/users/CandySunPlus/orgs","repos_url":"https://api.github.com/users/CandySunPlus/repos","events_url":"https://api.github.com/users/CandySunPlus/events{/privacy}","received_events_url":"https://api.github.com/users/CandySunPlus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-05-18T08:57:09Z","updated_at":"2018-05-18T14:26:05Z","closed_at":null,"author_association":"NONE","body":"In example ( micro/example/stream ), when I change client and server to grpc, server can't recv io.EOF error and got rpc error\r\n\r\n```\r\nrpc error: code = 1 desc = context canceled\r\n```\r\n\r\nclient:\r\n```go\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"context\"\r\n\r\n\tproto \"github.com/micro/examples/stream/server/proto\"\r\n\t\"github.com/micro/go-micro\"\r\n\tgrpcClient \"github.com/micro/go-plugins/client/grpc\"\r\n)\r\n\r\nfunc main() {\r\n\tservice := micro.NewService(\r\n\t\tmicro.Client(grpcClient.NewClient()),\r\n\t)\r\n\tservice.Init()\r\n\r\n\t// create client\r\n\tcl := proto.NewStreamerService(\"go.micro.srv.stream\", service.Client())\r\n\r\n\t// bidirectional stream\r\n\tbidirectional(cl)\r\n\r\n\t// server side stream\r\n\tserverStream(cl)\r\n}\r\n```\r\n\r\nserver:\r\n```golang\r\nimport (\r\n\t\"fmt\"\r\n\t\"log\"\r\n\r\n\t\"context\"\r\n\r\n\t\"github.com/micro/go-micro\"\r\n\t\"github.com/micro/go-micro/server\"\r\n\r\n\tproto \"github.com/micro/examples/stream/server/proto\"\r\n\tgrpcServer \"github.com/micro/go-plugins/server/grpc\"\r\n)\r\n\r\nfunc main() {\r\n\t// new service\r\n\tservice := micro.NewService(\r\n\t\tmicro.Server(grpcServer.NewServer(server.Name(\"go.micro.srv.stream\"))),\r\n\t\t// micro.Name(\"go.micro.srv.stream\"),\r\n\t)\r\n\r\n\t// Init command line\r\n\tservice.Init()\r\n\r\n\t// Register Handler\r\n\tproto.RegisterStreamerHandler(service.Server(), new(Streamer))\r\n\r\n\t// Run service\r\n\tif err := service.Run(); err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/micro/go-plugins/issues/comments/390224281","html_url":"https://github.com/micro/go-plugins/issues/183#issuecomment-390224281","issue_url":"https://api.github.com/repos/micro/go-plugins/issues/183","id":390224281,"user":{"login":"CandySunPlus","id":502700,"avatar_url":"https://avatars0.githubusercontent.com/u/502700?v=4","gravatar_id":"","url":"https://api.github.com/users/CandySunPlus","html_url":"https://github.com/CandySunPlus","followers_url":"https://api.github.com/users/CandySunPlus/followers","following_url":"https://api.github.com/users/CandySunPlus/following{/other_user}","gists_url":"https://api.github.com/users/CandySunPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/CandySunPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CandySunPlus/subscriptions","organizations_url":"https://api.github.com/users/CandySunPlus/orgs","repos_url":"https://api.github.com/users/CandySunPlus/repos","events_url":"https://api.github.com/users/CandySunPlus/events{/privacy}","received_events_url":"https://api.github.com/users/CandySunPlus/received_events","type":"User","site_admin":false},"created_at":"2018-05-18T14:26:05Z","updated_at":"2018-05-18T14:26:05Z","author_association":"NONE","body":"In order to make the output cleaner, I only printed the error on the server side."}}
{"actor":{"display_login":"CandySunPlus"}}