{"action":"opened","issue":{"url":"https://api.github.com/repos/grpc/grpc-go/issues/734","repository_url":"https://api.github.com/repos/grpc/grpc-go","labels_url":"https://api.github.com/repos/grpc/grpc-go/issues/734/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc-go/issues/734/comments","events_url":"https://api.github.com/repos/grpc/grpc-go/issues/734/events","html_url":"https://github.com/grpc/grpc-go/issues/734","id":162203724,"number":734,"title":"Stream seems to silently fall over after indeterminite time, possibly caused by flakey networking","user":{"login":"AmandaCameron","id":114638,"avatar_url":"https://avatars.githubusercontent.com/u/114638?v=3","gravatar_id":"","url":"https://api.github.com/users/AmandaCameron","html_url":"https://github.com/AmandaCameron","followers_url":"https://api.github.com/users/AmandaCameron/followers","following_url":"https://api.github.com/users/AmandaCameron/following{/other_user}","gists_url":"https://api.github.com/users/AmandaCameron/gists{/gist_id}","starred_url":"https://api.github.com/users/AmandaCameron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmandaCameron/subscriptions","organizations_url":"https://api.github.com/users/AmandaCameron/orgs","repos_url":"https://api.github.com/users/AmandaCameron/repos","events_url":"https://api.github.com/users/AmandaCameron/events{/privacy}","received_events_url":"https://api.github.com/users/AmandaCameron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-24T18:26:37Z","updated_at":"2016-06-24T18:26:37Z","closed_at":null,"body":"I've got a service written that I use to funnel alert notifications around my various infra, and I'm seeing that the listeners for this service's alerts is intermitently falling over and not spitting out any more alerts.\r\n\r\nBest I can guess is that the stream.Recv() call isn't returning an error as it should be in this case.\r\n\r\nThe relevent code: \r\n\r\n```go\r\nfunc dialAlerts(alertChan chan *alerts.Alert) {\r\n\tctx, done := context.WithCancel(context.Background())\r\n\tdefer done()\r\n\r\n\tcc, err := grpc.Dial(*alertsHost, grpc.WithInsecure())\r\n\tif err != nil {\r\n\t\tlogger.Log(\"msg\", \"Failed to connect to alerts.\",\r\n\t\t\t\"error\", err)\r\n\t\tos.Exit(1)\r\n\t}\r\n\r\n\talertsCli = alerts.NewAlertsClient(cc)\r\n\r\n\tconn, err := alertsCli.ReceiveAlerts(ctx, &alerts.SubscriptionOpts{\r\n\t\tTags: []string{\r\n\t\t\t\"__all__\",\r\n\t\t},\r\n\t})\r\n\tif err != nil {\r\n\t\tlogger.Log(\"msg\", \"Failed to subscribe to alerts.\",\r\n\t\t\t\"error\", err)\r\n\t\tos.Exit(1)\r\n\t}\r\n\r\n\tfor {\r\n\t\talert, err := conn.Recv()\r\n\t\tif err != nil {\r\n\t\t\tlogger.Log(\"msg\", \"Failed to read from alerts.\",\r\n\t\t\t\t\"error\", err)\r\n\r\n\t\t\tos.Exit(1)\r\n\t\t}\r\n\r\n\t\talertChan <- alert\r\n\t}\r\n}```"}}
{"actor":{"display_login":"AmandaCameron"}}