-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Description
Ably 2.3.2
How do I close a channel when there's no network? (The channel is no longer needed, and the client's presence should also be removed).
I don't see any pattern for gracefully closing a channel in your documentation.
My code currently looks like this:
channel.detach()
.finally(() => connection.release(<channelName>))When there is no network:
detach()fails with:_ErrorInfo: Connection to server unavailablerelease()fails with:Can only release a channel in a state where there is no possibility of further updates from the server being received (initialized, detached, or failed); was suspended
Problems:
Once the network returns, the channel will re-attched and presence will be re-entered.
Metadata
Metadata
Assignees
Labels
No labels