pusher / pusher-websocket-unity

Pusher Channels Unity Client Library
MIT License
27 stars 20 forks source link

Duplicate events received after reconnecting #28

Closed rarepixel-studio closed 2 years ago

rarepixel-studio commented 3 years ago

Hello I receive duplicate events after the client reconnects to the pusher server. The pusher's Debug console shows that the client, while is not disconnected yet on the server side, subscribes to the same channel (A private channel in this case) again.

Thank you

twomedia commented 3 years ago

For us, we had to add a special check to ensure that we only added the event bind if we hadn't done so already, otherwise when we reconnect and subscribe to channels it'll add duplicate binds. We did this by checking if _pusher.Channels contained the channel we were trying to subscribe to, if it did then we don't bind.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you'd like this issue to stay open please leave a comment indicating how this issue is affecting you. Thank you.