mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-06-02 06:23:37 +02:00
bd1a95cac5
The lightweight soft-rejoin path (jSess.Rejoin) skips Jicofo focus allocation and joins the MUC with a bare presence. After the client leaves and Jicofo idle-terminates the now-empty conference (session-terminate <expired/>), the room/focus is torn down. A bare rejoin presence is then rejected by Prosody with <presence type='error'><not-allowed/>, and the library's JoinMUC matches a stale status-110 left in its stanza buffer and falsely reports success. The engine then waits forever for a session-initiate that never arrives while actually being outside the room, so the client can never reconnect. Re-establish the session from scratch via j.JoinMUC instead, which runs dial -> focus allocation -> MUC join in the correct order (focus first, so Jicofo recreates the room), exactly like the initial Connect, but WITHOUT blocking on session-initiate. The fresh session-initiate is awaited separately via WaitJingleReinitiate once a peer rejoins, so the non-blocking reconnect contract is preserved. Verified on a live deployment: two consecutive reconnect cycles now complete (bridge open sctp -> reconnected -> session opened) where the old path hung after "waiting for session-initiate". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>