{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-node/issues/1789","repository_url":"https://api.github.com/repos/Azure/azure-sdk-for-node","labels_url":"https://api.github.com/repos/Azure/azure-sdk-for-node/issues/1789/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-node/issues/1789/comments","events_url":"https://api.github.com/repos/Azure/azure-sdk-for-node/issues/1789/events","html_url":"https://github.com/Azure/azure-sdk-for-node/issues/1789","id":162947396,"number":1789,"title":"RoleEnvironment events do not seem to work at all","user":{"login":"drcmda","id":2223602,"avatar_url":"https://avatars.githubusercontent.com/u/2223602?v=3","gravatar_id":"","url":"https://api.github.com/users/drcmda","html_url":"https://github.com/drcmda","followers_url":"https://api.github.com/users/drcmda/followers","following_url":"https://api.github.com/users/drcmda/following{/other_user}","gists_url":"https://api.github.com/users/drcmda/gists{/gist_id}","starred_url":"https://api.github.com/users/drcmda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drcmda/subscriptions","organizations_url":"https://api.github.com/users/drcmda/orgs","repos_url":"https://api.github.com/users/drcmda/repos","events_url":"https://api.github.com/users/drcmda/events{/privacy}","received_events_url":"https://api.github.com/users/drcmda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-29T14:57:01Z","updated_at":"2016-06-29T14:57:01Z","closed_at":null,"body":"``` js\r\nazure.RoleEnvironment.isAvailable((error, available) => {\r\n    if (available) {\r\n        azure.RoleEnvironment.getCurrentRoleInstance((error, instance) => {\r\n            if (!error && instance['endpoints']) {\r\n                let ip = instance['endpoints']['PublicEndpoint']['address'];\r\n                let publicport = instance['endpoints']['PublicEndpoint']['port'];\r\n                let privateport = instance['endpoints']['InternalEndpoint']['port'];\r\n\r\n                // ???\r\n                azure.RoleEnvironment.on('changed', () => myfunction(ip, privateport));\r\n```\r\n\r\nI have tried to listen to them all (started, stopped, etc.) and things get weird. It causes the role to be started twice.\r\n\r\nI haven't found any examples or public ducuments regarding this."}}
{"actor":{"display_login":"drcmda"}}