This worker marks the trackable for removal (and in doing so, removes any StateFlows for the trackable and marks the final state as offline), then asynchronously disconnects the Ably channel, followed by posting the DisconnectSuccess work to tidy up the trackable. It is at this point, once the trackable is marked for removal and before ably channel disconnection occurs, that a call to publisher.remove() should return to the caller, allowing the rest of removal (including Ably disconnect) to occur in the background.
On any error, or if the publisher is stopped, the user provided callback shall be called with failure.
Implement the following worker from AAT Android:
This worker marks the trackable for removal (and in doing so, removes any StateFlows for the trackable and marks the final state as offline), then asynchronously disconnects the Ably channel, followed by posting the DisconnectSuccess work to tidy up the trackable. It is at this point, once the trackable is marked for removal and before ably channel disconnection occurs, that a call to
publisher.remove()
should return to the caller, allowing the rest of removal (including Ably disconnect) to occur in the background.On any error, or if the publisher is stopped, the user provided callback shall be called with failure.
This work depends on: