danielrhodes / Swift-ActionCableClient

ActionCable is a new WebSocket server being released with Rails 5 which makes it easy to add real-time features to your app. This Swift client makes it dead-simple to connect with that server, abstracting away everything except what you need to get going.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with unconfirmed list of channels

mbutan opened this issue · comments

Hey,

the problem is related to unsubscribed channels which from some server or others reasons couldn't be subscribed (without any confirmation). If the channel's event ChannelEventsChannel appends unconfirmedChannels list cannot be released properly and is returning all the time. I suggest to release this array when unsubscribe() is called.

I think the issue resides in channels being identified by their name property.
Another solution I would see is either specify the identifier to the Channel in the channels property of the ActionCableClient, or do the identification by default on its identifier dictionary passed at the create: function.
Either way, they don't need to be identified or have only the current option of being identified by their name property. Cause on the server you connect to the same class name, so all channels will have the same name.
I'm not sure if I made myself clear, @danielrhodes. If I didn't, I can further develop.