Swap result sink atomically rather than closing and setting. (#4216)

To prevent WriteMessage after Close potentially.
This commit is contained in:
Raja Subramanian
2026-01-03 03:17:58 +05:30
committed by GitHub
parent 46651c1978
commit 335f4c33fb
10 changed files with 80 additions and 66 deletions
+1 -2
View File
@@ -551,8 +551,7 @@ func (r *Room) ResumeParticipant(
) error {
r.ReplaceParticipantRequestSource(p.Identity(), requestSource)
// close previous sink, and link to new one
p.CloseSignalConnection(types.SignallingCloseReasonResume)
p.SetResponseSink(responseSink)
p.SwapResponseSink(responseSink, types.SignallingCloseReasonResume)
p.SetSignalSourceValid(true)