From 7878dcf19df54b62c30303beedc6fc59971c4705 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 3 Feb 2023 16:23:30 +0000 Subject: [PATCH] address comments --- go.sum | 2 -- pkg/rtc/room.go | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/go.sum b/go.sum index 59c6ed32c..085e14403 100644 --- a/go.sum +++ b/go.sum @@ -234,8 +234,6 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ= github.com/livekit/mediatransportutil v0.0.0-20230130133657-96cfb115473a h1:5UkGQpskXp7HcBmyrCwWtO7ygDWbqtjN09Yva4l/nyE= github.com/livekit/mediatransportutil v0.0.0-20230130133657-96cfb115473a/go.mod h1:1Dlx20JPoIKGP45eo+yuj0HjeE25zmyeX/EWHiPCjFw= -github.com/livekit/protocol v1.3.3-0.20230202034647-c71216774a62 h1:wLkf7jiWtA0q+3y192KEkWIdKUrh+cXz/pBwVMZBwq4= -github.com/livekit/protocol v1.3.3-0.20230202034647-c71216774a62/go.mod h1:gwCG03nKlHlC9hTjL4pXQpn783ALhmbyhq65UZxqbb8= github.com/livekit/protocol v1.3.3-0.20230203144205-a6f6dde5db6f h1:rTAq0RC3+aV2ODOy4TqljYb84j1wSXdt2spRdwijcw8= github.com/livekit/protocol v1.3.3-0.20230203144205-a6f6dde5db6f/go.mod h1:gwCG03nKlHlC9hTjL4pXQpn783ALhmbyhq65UZxqbb8= github.com/livekit/psrpc v0.2.5 h1:+EZS78MGdBZxzCUwinDQ6pOeqPDURisrGtfyyqwUDSI= diff --git a/pkg/rtc/room.go b/pkg/rtc/room.go index 471ec724d..482987672 100644 --- a/pkg/rtc/room.go +++ b/pkg/rtc/room.go @@ -372,8 +372,7 @@ func (r *Room) ResumeParticipant(p types.LocalParticipant, responseSink routing. p.CloseSignalConnection() p.SetResponseSink(responseSink) - reconnectResponse := r.createReconnectResponseLocked(p, iceServers) - + reconnectResponse := r.createReconnectResponse(p, iceServers) if err := p.SendReconnectResponse(reconnectResponse); err != nil { prometheus.ServiceOperationCounter.WithLabelValues("participant_resume", "error", "send_response").Add(1) return err @@ -718,7 +717,6 @@ func (r *Room) autoSubscribe(participant types.LocalParticipant) bool { } func (r *Room) createJoinResponseLocked(participant types.LocalParticipant, iceServers []*livekit.ICEServer) *livekit.JoinResponse { - // gather other participants and send join response otherParticipants := make([]*livekit.ParticipantInfo, 0, len(r.participants)) for _, p := range r.participants { if p.ID() != participant.ID() && !p.Hidden() { @@ -743,8 +741,7 @@ func (r *Room) createJoinResponseLocked(participant types.LocalParticipant, iceS } } -func (r *Room) createReconnectResponseLocked(participant types.LocalParticipant, iceServers []*livekit.ICEServer) *livekit.ReconnectResponse { - // gather other participants and send join response +func (r *Room) createReconnectResponse(participant types.LocalParticipant, iceServers []*livekit.ICEServer) *livekit.ReconnectResponse { otherParticipants := make([]*livekit.ParticipantInfo, 0, len(r.participants)) for _, p := range r.participants { if p.ID() != participant.ID() && !p.Hidden() {