Repository navigation
fix(client): re-arm stale connection watchdog after each stale period - #25950
ramonlsouza merged 2 commits into
Conversation
chore: BigBlueButton 3.0.39 iteration
The watchdog added in bigbluebutton#21492 arms a timer to terminate and reconnect the GraphQL websocket when no message arrives for 15 s. It only arms the timer when the ref is empty, but the ref was never cleared: not when messages resume, nor when the timer fires. So the forced reconnect worked once per page load. Every later stale period left the client silent until the user reloaded. Clear the ref in both places so every stale period gets its own timer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe stale-connection timeout callback now resets Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The watchdog can now terminate later stale periods as intended. No concrete merge-blocking behavior was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Automated tests have passed! |
b93ac5f
into
bigbluebutton:v3.0.x-develop
What does this PR do?
Makes the stale connection watchdog in
ConnectionManager(added in #21492) work every time, instead of once per page load.The watchdog arms a timer that terminates the GraphQL websocket when no message has arrived for 15 s, so that the client reconnects. It only arms the timer when
terminateTimeoutRef.currentis empty. The ref was never cleared, either when messages resumed or when the timer fired. So after the first stale period in a page load, recovered or not, later stale periods armed no timer, and the client stayed silent until the user reloaded.This PR clears the ref in both places.
Closes Issue(s)
None filed. #21062 may be the same symptom.
Motivation
We saw a user stuck for 6.5 minutes on 4.0.0-rc.3. Chat kept spinning, the user list stopped updating and mute did not respond, but the server was receiving and applying everything the client sent. The only thing missing was server→browser data. A shorter stale period a minute earlier had recovered on its own, which used up the watchdog.
Across client logs from 7 production servers over 18 days, for stale periods that reached the 30 s terminate point:
Page loads were inferred from the logs, which accounts for the residue on each side.
How to test
On a test server, with one client in a meeting and its console open:
sudo kill -STOP $(pidof bbb-graphql-middleware), wait about 25 s, thensudo kill -CONT …. The client logs "Server is not responding" (3003) and then recovers. No reconnect is expected, because the pause is shorter than detection plus 30 s.Before this change, step 2 gives no
Connection terminated (4499), and the client only recovers when the process resumes. After it, step 2 logs 4499 30 s after detection and the client reconnects once the middleware is back. Repeat step 2: it reconnects each time.More
I haven't run these steps against a server with the patched build. The diagnosis comes from reading the code and from the production client logs above. The change applies cleanly to
v4.0.x-develop. The same code is ondevelop.🤖 Generated with Claude Code