Skip to content

Presence.endSync throws NullPointerException when processing a message #853

@davyskiba

Description

@davyskiba

A client has reported a NullPointerException thrown in ConnectionManager.onMessage(). Looking through the source, I think it is thrown in this line in Presence.endSync method.

Looks like we're trying to get an entry that is no longer present in the map. Since the client is operating with an unstable network connection, I think it might be caused by concurrent modification, caused by concurrent calls to endSync in response to messages arriving in a batch after restoring connectivity. 🤔

Originally reported here in ably-asset-tracking-android.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions