This worker is called when a consumer calls subscriber.stop(). It calls ably.close(), marks the subscriber as stopped, sets all trackables as offline (do check the TODO comment in Android on this bit) and then notifies the caller of success via callback.
If the subscriber is already stopped, and doWhenStopped is called, then the user callback should be called with success.
Implement the following worker:
This worker is called when a consumer calls
subscriber.stop()
. It callsably.close()
, marks the subscriber as stopped, sets all trackables as offline (do check the TODO comment in Android on this bit) and then notifies the caller of success via callback.If the subscriber is already stopped, and doWhenStopped is called, then the user callback should be called with success.