Export CloseSignalConnection (#936)

* Export CloseSignalConnection

There are a few places where that close pattern is repeated.
Export it and use that function in other places directly.

* fix test
This commit is contained in:
Raja Subramanian
2022-08-21 11:33:35 +05:30
committed by GitHub
parent b8bda3f14b
commit 70422c0267
6 changed files with 41 additions and 77 deletions
+1 -3
View File
@@ -333,9 +333,7 @@ func (r *Room) Join(participant types.LocalParticipant, opts *ParticipantOptions
func (r *Room) ResumeParticipant(p types.LocalParticipant, responseSink routing.MessageSink) error {
// close previous sink, and link to new one
if prevSink := p.GetResponseSink(); prevSink != nil {
prevSink.Close()
}
p.CloseSignalConnection()
p.SetResponseSink(responseSink)
updates := ToProtoParticipants(r.GetParticipants())