lukeredpath/libPusher — Issue #25: Unsubscribed channels are not released
Author: tim17x6
Created: 2012-02-23 07:35:52+00:00
State: open

Luke:

I am using libPusher build 7f7bf1b787, which is the one named version 1.1, just before you ARC-enabled the library. I am using this library since my current project is not ARC-enabled.

I am attempting to subscribe and unsubscribe from authenticated private channels. Subscribing to channels and binding to events works fine. When I unsubscribe from channels, everything seems to work fine. It appears, however, that all of the channels remain in memory.

Consequently, when the async connection drops and attempts to reconnect, it will attempt to reauthenticate and resubscribe to all the channels stored in the client - including all of the ones that were previously unsubscribed.

Additionally, every time resubscribe to a new channel, the 'subscription-succeeded' event triggers handlers for every channel - including ones that were previously unsubscribed.

Have you noticed this behaviour? Is there a way to fix?

Ideally, when I unsubscribe from a channel, I would like to permanently remove all objects and events associated with that channel.

Your help would be greatly appreciated.

Many thanks,
Tim