ably / ably-asset-tracking-android

Android client SDKs for the Ably Asset Tracking service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Re-adding trackable immediately after removing it causes NullPointerException

AndyTWF opened this issue · comments

When RemoveTrackableWorker is called, the trackables stateflow is removed, but the trackable itself isn't removed until DisconnectSuccessWorker - which happens after various async work. Control returns to the caller of publisher.remove() during RemoveTrackableWorker.

In the unlikely event that the trackable call is re-added after RemoveTrackableWorker but before the rest, a NPE is thrown in AddTracakbleWorker because the trackable state flow no longer exists.

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3306