payload: {"action":"created","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":"2019-02-23T22:43:57Z","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?"},"comment":{"url":"https://api.github.com/repos/tlaverdure/laravel-echo-server/issues/comments/466706437","html_url":"https://github.com/tlaverdure/laravel-echo-server/issues/315#issuecomment-466706437","issue_url":"https://api.github.com/repos/tlaverdure/laravel-echo-server/issues/315","id":466706437,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2NjcwNjQzNw==","user":{"login":"MGAyoub","id":16436457,"node_id":"MDQ6VXNlcjE2NDM2NDU3","avatar_url":"https://avatars0.githubusercontent.com/u/16436457?v=4","gravatar_id":"","url":"https://api.github.com/users/MGAyoub","html_url":"https://github.com/MGAyoub","followers_url":"https://api.github.com/users/MGAyoub/followers","following_url":"https://api.github.com/users/MGAyoub/following{/other_user}","gists_url":"https://api.github.com/users/MGAyoub/gists{/gist_id}","starred_url":"https://api.github.com/users/MGAyoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MGAyoub/subscriptions","organizations_url":"https://api.github.com/users/MGAyoub/orgs","repos_url":"https://api.github.com/users/MGAyoub/repos","events_url":"https://api.github.com/users/MGAyoub/events{/privacy}","received_events_url":"https://api.github.com/users/MGAyoub/received_events","type":"User","site_admin":false},"created_at":"2019-02-23T22:43:57Z","updated_at":"2019-02-23T22:43:57Z","author_association":"NONE","body":"what do you mean \"unique connection\" ?!"}}
other: {"actor":{"display_login":"MGAyoub"}}