Skip to content

Commit

Permalink
OF-2921: Partial revert of b98a83d
Browse files Browse the repository at this point in the history
Routing the unavailable presence that's sent out when a session closes cannot be made asynchronous. If the 'next step' is done prior to the routing of unavailable presence having completed, the session seems to be (partially) re-added. This causes an invalid state: the routing table no longer has the session, but caches such as the Routing Users Cache does.

This incorrect behavior was introduced by a fix for OF-2921: b98a83d

It was already partially reverted by 7aca93f

This commit reverts the remainder.
  • Loading branch information
guusdk committed Jan 14, 2025
1 parent 665b4e1 commit fd6dd0c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ public synchronized void terminateDetached(LocalSession session) {
Presence presence = new Presence();
presence.setType(Presence.Type.unavailable);
presence.setFrom(session.getAddress());

// Broadcast asynchronously, to reduce the likelihood of the broadcast introducing a deadlock (OF-2921).
TaskEngine.getInstance().submit(() -> router.route(presence));
router.route(presence);
}

session.getStreamManager().onClose(router, serverAddress);
Expand Down

0 comments on commit fd6dd0c

Please sign in to comment.