{"action":"created","issue":{"url":"https://api.github.com/repos/nats-io/csnats/issues/111","repository_url":"https://api.github.com/repos/nats-io/csnats","labels_url":"https://api.github.com/repos/nats-io/csnats/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/nats-io/csnats/issues/111/comments","events_url":"https://api.github.com/repos/nats-io/csnats/issues/111/events","html_url":"https://github.com/nats-io/csnats/issues/111","id":174222534,"number":111,"title":"Missing url in Disconnect/Closed events","user":{"login":"T-Erpstra","id":21358188,"avatar_url":"https://avatars.githubusercontent.com/u/21358188?v=3","gravatar_id":"","url":"https://api.github.com/users/T-Erpstra","html_url":"https://github.com/T-Erpstra","followers_url":"https://api.github.com/users/T-Erpstra/followers","following_url":"https://api.github.com/users/T-Erpstra/following{/other_user}","gists_url":"https://api.github.com/users/T-Erpstra/gists{/gist_id}","starred_url":"https://api.github.com/users/T-Erpstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/T-Erpstra/subscriptions","organizations_url":"https://api.github.com/users/T-Erpstra/orgs","repos_url":"https://api.github.com/users/T-Erpstra/repos","events_url":"https://api.github.com/users/T-Erpstra/events{/privacy}","received_events_url":"https://api.github.com/users/T-Erpstra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-31T09:11:29Z","updated_at":"2016-09-05T06:45:08Z","closed_at":null,"body":"I have this code for the connection callbacks:\r\n```\r\nOptions opts = ConnectionFactory.GetDefaultOptions();\r\nopts.ClosedEventHandler += ( s, e ) => {\r\n\t_logger.Error( \"Connection to {0} was closed.\", e.Conn.ConnectedUrl );\r\n};\r\nopts.DisconnectedEventHandler += ( s, e ) => {\r\n\t_logger.Error( \"Disconnected from {0}.\", e.Conn.ConnectedUrl );\r\n};\r\n```\r\nIt seems that the e.Conn.ConnectedUrl is null on both events, which makes it hard to know from which server one lost the connection.\r\n\r\nAlso, I miss a \"ConnectedEventHandler\" so that I can know when the first connection actually succeeded and to which server (ReconnectedEventHandler doesn't fire on inital connections).\r\n"},"comment":{"url":"https://api.github.com/repos/nats-io/csnats/issues/comments/244669695","html_url":"https://github.com/nats-io/csnats/issues/111#issuecomment-244669695","issue_url":"https://api.github.com/repos/nats-io/csnats/issues/111","id":244669695,"user":{"login":"T-Erpstra","id":21358188,"avatar_url":"https://avatars.githubusercontent.com/u/21358188?v=3","gravatar_id":"","url":"https://api.github.com/users/T-Erpstra","html_url":"https://github.com/T-Erpstra","followers_url":"https://api.github.com/users/T-Erpstra/followers","following_url":"https://api.github.com/users/T-Erpstra/following{/other_user}","gists_url":"https://api.github.com/users/T-Erpstra/gists{/gist_id}","starred_url":"https://api.github.com/users/T-Erpstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/T-Erpstra/subscriptions","organizations_url":"https://api.github.com/users/T-Erpstra/orgs","repos_url":"https://api.github.com/users/T-Erpstra/repos","events_url":"https://api.github.com/users/T-Erpstra/events{/privacy}","received_events_url":"https://api.github.com/users/T-Erpstra/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T06:45:08Z","updated_at":"2016-09-05T06:45:08Z","body":"Thanks for your replies!\r\n\r\nYes, I think those workarounds would solve the \"issue\".\r\n\r\nI just wanted to raise the awareness that they might be nice to have. It's not that these things are blocking me, but this type of information is sometimes useful when trying to detect problems or potential issues (like crappy networks or unstable servers) that doesn't necessarily take the whole system down, but still affects it.\r\n"}}
{"actor":{"display_login":"T-Erpstra"}}