Pass back serverRegion in when participant's joining (#479)

* Pass back serverRegion in when participant's joining

* fix tests

* protocol update
This commit is contained in:
David Zhao
2022-03-02 13:36:19 -08:00
committed by GitHub
parent c743d2ab3a
commit 7a5b5dbc69
8 changed files with 29 additions and 24 deletions
+2 -2
View File
@@ -167,7 +167,7 @@ func (r *Room) Release() {
r.holds.Dec()
}
func (r *Room) Join(participant types.LocalParticipant, opts *ParticipantOptions, iceServers []*livekit.ICEServer) error {
func (r *Room) Join(participant types.LocalParticipant, opts *ParticipantOptions, iceServers []*livekit.ICEServer, region string) error {
r.lock.Lock()
defer r.lock.Unlock()
@@ -259,7 +259,7 @@ func (r *Room) Join(participant types.LocalParticipant, opts *ParticipantOptions
}
})
if err := participant.SendJoinResponse(r.Room, otherParticipants, iceServers); err != nil {
if err := participant.SendJoinResponse(r.Room, otherParticipants, iceServers, region); err != nil {
prometheus.ServiceOperationCounter.WithLabelValues("participant_join", "error", "send_response").Add(1)
return err
}