{"action":"created","issue":{"url":"https://api.github.com/repos/simonhamp/laravel-echo-ratchet-server/issues/1","repository_url":"https://api.github.com/repos/simonhamp/laravel-echo-ratchet-server","labels_url":"https://api.github.com/repos/simonhamp/laravel-echo-ratchet-server/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/simonhamp/laravel-echo-ratchet-server/issues/1/comments","events_url":"https://api.github.com/repos/simonhamp/laravel-echo-ratchet-server/issues/1/events","html_url":"https://github.com/simonhamp/laravel-echo-ratchet-server/issues/1","id":295217000,"number":1,"title":"Remove connections from subscribedTopics in onClose","user":{"login":"francislavoie","id":2111701,"avatar_url":"https://avatars3.githubusercontent.com/u/2111701?v=4","gravatar_id":"","url":"https://api.github.com/users/francislavoie","html_url":"https://github.com/francislavoie","followers_url":"https://api.github.com/users/francislavoie/followers","following_url":"https://api.github.com/users/francislavoie/following{/other_user}","gists_url":"https://api.github.com/users/francislavoie/gists{/gist_id}","starred_url":"https://api.github.com/users/francislavoie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francislavoie/subscriptions","organizations_url":"https://api.github.com/users/francislavoie/orgs","repos_url":"https://api.github.com/users/francislavoie/repos","events_url":"https://api.github.com/users/francislavoie/events{/privacy}","received_events_url":"https://api.github.com/users/francislavoie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-07T17:04:20Z","updated_at":"2018-03-01T15:24:43Z","closed_at":null,"author_association":"NONE","body":"FYI you're not cleaning up the subscribers after they disconnect, they just pile up infinitely as-is.\r\n\r\nI think one way to do it would be to create an `\\SplObjectStorage` for each of the subscribed topics instead of just appending to that topic. That way it's easy enough to do a lookup.\r\n\r\nCould also store the topics a particular connection cares about so you're not looping over all the topics to find the connection when you need to disconnect.\r\n\r\nI might write up a PR for this soon-ish"},"comment":{"url":"https://api.github.com/repos/simonhamp/laravel-echo-ratchet-server/issues/comments/369626764","html_url":"https://github.com/simonhamp/laravel-echo-ratchet-server/issues/1#issuecomment-369626764","issue_url":"https://api.github.com/repos/simonhamp/laravel-echo-ratchet-server/issues/1","id":369626764,"user":{"login":"simonhamp","id":31628,"avatar_url":"https://avatars1.githubusercontent.com/u/31628?v=4","gravatar_id":"","url":"https://api.github.com/users/simonhamp","html_url":"https://github.com/simonhamp","followers_url":"https://api.github.com/users/simonhamp/followers","following_url":"https://api.github.com/users/simonhamp/following{/other_user}","gists_url":"https://api.github.com/users/simonhamp/gists{/gist_id}","starred_url":"https://api.github.com/users/simonhamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonhamp/subscriptions","organizations_url":"https://api.github.com/users/simonhamp/orgs","repos_url":"https://api.github.com/users/simonhamp/repos","events_url":"https://api.github.com/users/simonhamp/events{/privacy}","received_events_url":"https://api.github.com/users/simonhamp/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T15:24:43Z","updated_at":"2018-03-01T15:24:43Z","author_association":"OWNER","body":"Excellent! Thank you. I will close this once I've integrated, tested and deployed your changes."}}
{"actor":{"display_login":"simonhamp"}}