Repository navigation
fix(rtc): drain publisher negotiation during session shutdown - #5
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughДобавлена поддержка pre-encoded H.264 кадров через FFI и pass-through encoder. Добавлено переиспользование RTP-трансиверов. Завершение RTC-сессии теперь отменяет и ожидает negotiation и debouncer задачи. Обновлены владение WebRTC-ресурсами, обработчики событий и документация. ChangesRTC runtime
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: ⚪ Minimal · up to RTC session shutdown now cancels and joins negotiation and debouncer work before connection teardown, preventing retained session resources without an identified current-head merge risk. Sequence Diagram(s)sequenceDiagram
participant FfiClient
participant VideoSource
participant PassthroughVideoEncoder
participant WebRTC
FfiClient->>VideoSource: CaptureEncodedVideoFrame
VideoSource->>PassthroughVideoEncoder: передать H.264 access unit
PassthroughVideoEncoder->>WebRTC: передать кадр или запросить keyframe
Suggested reviewers: Poem
🚥 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 |
Rapid publish/unpublish followed by Room disconnect could leave publisher negotiation waiting for an answer on a closed peer connection. The detached task retained the session and native factory threads through its ten-second timeout and retry, violating the application's five-second lifecycle cleanup budget.
Session close now cancels and joins the one owned fast negotiation task and its debouncer before closing signaling and peer connections. Creation and shutdown use the same locks and a closed-session guard. Debouncer cancellation also interrupts an already running future. The public API, sender ownership, ICE eligibility and resource thresholds are unchanged.
Focused validation:
.8failed at +4 handles/+2 threads after 5065 ms cleanup; candidate passed at 0/0, zero pending callbacks and zero cleanup wait.build.cmd release-tests; no full local SDK or capture matrix was run.The consolidated Rust patch passes reverse applicability verification. Candidate normalized tree:
8f5c3220de048f23a8f17b4a65653be3c5b11179.Prerequisite for syrnike13/syrnike13-app#126 and planned SDK
.9release. Source details and evidence are indocs/negotiation-shutdown.md.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Новые возможности
Исправления
Документация