Race condition when collecting presence of other sessions for the same user

Description

When a resource connects, it is sent the presence information of all other connected resources of the same user. This occurs in `org.jivesoftware.openfire.SessionManager#broadcastPresenceOfOtherResource`

An exception has been logged by this code, that suggests that there's a race condition. The code first gets all addresses of the user, then, per address, finds a session. If between those calls a route gets removed, a nullpointerexception can occur (as the code assumes that the session will be non-null).

Environment

None

Activity

Show:
Guus der Kinderen
March 2, 2021, 1:09 PM

Something similar happens in org.jivesoftware.openfire.SessionManager#getSessions(java.lang.String)

Assignee

Guus der Kinderen

Reporter

Guus der Kinderen

Labels

None

Expected Effort

None

Ignite Forum URL

None

Components

Priority

Minor