{"action":"created","issue":{"url":"https://api.github.com/repos/uxder/Radio/issues/16","labels_url":"https://api.github.com/repos/uxder/Radio/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/uxder/Radio/issues/16/comments","events_url":"https://api.github.com/repos/uxder/Radio/issues/16/events","html_url":"https://github.com/uxder/Radio/issues/16","id":93317964,"number":16,"title":"unsubscribe within subscribe function","user":{"login":"notionslate","id":1894386,"avatar_url":"https://avatars.githubusercontent.com/u/1894386?v=3","gravatar_id":"","url":"https://api.github.com/users/notionslate","html_url":"https://github.com/notionslate","followers_url":"https://api.github.com/users/notionslate/followers","following_url":"https://api.github.com/users/notionslate/following{/other_user}","gists_url":"https://api.github.com/users/notionslate/gists{/gist_id}","starred_url":"https://api.github.com/users/notionslate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notionslate/subscriptions","organizations_url":"https://api.github.com/users/notionslate/orgs","repos_url":"https://api.github.com/users/notionslate/repos","events_url":"https://api.github.com/users/notionslate/events{/privacy}","received_events_url":"https://api.github.com/users/notionslate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-06T16:14:52Z","updated_at":"2015-07-09T14:31:38Z","closed_at":null,"body":"My desire is to unsubscribe to a broadcast after the first broadcast, so I put an unsubscribe method at the end of my subscribe function.  This works unless another subscriber is also listening for the same broadcast.  In that case, my subscribe function is called (where it unsubscribes itself), but then, rather than the other subscriber function being called, my subscribe function is called a second time.\r\n\r\nCan this behavior be verified?\r\nIs there a better way to do what I'm trying to do?"},"comment":{"url":"https://api.github.com/repos/uxder/Radio/issues/comments/120001993","html_url":"https://github.com/uxder/Radio/issues/16#issuecomment-120001993","issue_url":"https://api.github.com/repos/uxder/Radio/issues/16","id":120001993,"user":{"login":"notionslate","id":1894386,"avatar_url":"https://avatars.githubusercontent.com/u/1894386?v=3","gravatar_id":"","url":"https://api.github.com/users/notionslate","html_url":"https://github.com/notionslate","followers_url":"https://api.github.com/users/notionslate/followers","following_url":"https://api.github.com/users/notionslate/following{/other_user}","gists_url":"https://api.github.com/users/notionslate/gists{/gist_id}","starred_url":"https://api.github.com/users/notionslate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notionslate/subscriptions","organizations_url":"https://api.github.com/users/notionslate/orgs","repos_url":"https://api.github.com/users/notionslate/repos","events_url":"https://api.github.com/users/notionslate/events{/privacy}","received_events_url":"https://api.github.com/users/notionslate/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T14:31:38Z","updated_at":"2015-07-09T14:31:38Z","body":"Thanks for the second...what I ended up doing was creating a second distinct channel so I know there will only be one subscriber - not ideal, but it does the job.  My guess is that an internal radio array gets 'confused' when a function is removed from the array while it is in the middle of traversing the array to call functions for the channel. Also guessing that if the unsubscribe was called while in the last subscriber function, the problem would not be seen."}}