{"action":"closed","issue":{"url":"https://api.github.com/repos/tlaverdure/laravel-echo-server/issues/315","repository_url":"https://api.github.com/repos/tlaverdure/laravel-echo-server","labels_url":"https://api.github.com/repos/tlaverdure/laravel-echo-server/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/tlaverdure/laravel-echo-server/issues/315/comments","events_url":"https://api.github.com/repos/tlaverdure/laravel-echo-server/issues/315/events","html_url":"https://github.com/tlaverdure/laravel-echo-server/issues/315","id":337206319,"node_id":"MDU6SXNzdWUzMzcyMDYzMTk=","number":315,"title":"Not getting a leave event on page refresh","user":{"login":"exwizzard","id":1271688,"node_id":"MDQ6VXNlcjEyNzE2ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/1271688?v=4","gravatar_id":"","url":"https://api.github.com/users/exwizzard","html_url":"https://github.com/exwizzard","followers_url":"https://api.github.com/users/exwizzard/followers","following_url":"https://api.github.com/users/exwizzard/following{/other_user}","gists_url":"https://api.github.com/users/exwizzard/gists{/gist_id}","starred_url":"https://api.github.com/users/exwizzard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exwizzard/subscriptions","organizations_url":"https://api.github.com/users/exwizzard/orgs","repos_url":"https://api.github.com/users/exwizzard/repos","events_url":"https://api.github.com/users/exwizzard/events{/privacy}","received_events_url":"https://api.github.com/users/exwizzard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-30T10:59:30Z","updated_at":"2018-07-09T16:43:33Z","closed_at":"2018-07-09T16:43:33Z","author_association":"NONE","body":"I am using presence channels with laravel echo and listening for leave events in order to trigger some code.\r\n\r\nThe leave event fires when I close the tab or browser, it also fires when I browse to a new page. But for some reason it does not fire when I refresh the page, it just rejoins the presence channel and it causes my code to add extra listeners. Every time the page is refreshed it adds another listener and then I get an error that there are too many listeners after about 11 refreshes. \r\n\r\nI was looking at the echo server log file and I noticed one thing, this event fires when I refresh the page:\r\n\r\n`[10:43:54] - C6bO4RT7uRJE54mAAAIL left channel: presence-channel.10 (unsubscribed)`\r\n\r\nWhen I close the browser or go to a new page it does this instead:\r\n\r\n`[10:43:45] - 7XuNd5NAZl9-LmSnAAI7 left channel: presence-channel.10 (transport close)`\r\n\r\nHow can I listen for this \"unsubscribed\" event when its not getting picked up by the .leaving listener?"}}
{"actor":{"display_login":"exwizzard"}}