Add reconnect reason and signal rtt calculation (#1381)

* Add connect reason and signal rtt calculate

* Update protocol

* solve comment
This commit is contained in:
cnderrauber
2023-02-06 11:12:25 +08:00
committed by GitHub
parent d67cdb6141
commit 8b6dab780c
16 changed files with 221 additions and 118 deletions
+3 -2
View File
@@ -237,6 +237,7 @@ func (r *RoomManager) StartSession(
"room", roomName,
"nodeID", r.currentNode.Id,
"participant", pi.Identity,
"reason", pi.ReconnectReason,
)
iceConfig := r.getIceConfig(participant)
if iceConfig == nil {
@@ -244,11 +245,11 @@ func (r *RoomManager) StartSession(
}
if err = room.ResumeParticipant(participant, responseSink,
r.iceServersForRoom(protoRoom, iceConfig.PreferenceSubscriber == livekit.ICECandidateType_ICT_TLS),
); err != nil {
pi.ReconnectReason); err != nil {
logger.Warnw("could not resume participant", err, "participant", pi.Identity)
return err
}
r.telemetry.ParticipantResumed(ctx, room.ToProto(), participant.ToProto(), livekit.NodeID(r.currentNode.Id))
r.telemetry.ParticipantResumed(ctx, room.ToProto(), participant.ToProto(), livekit.NodeID(r.currentNode.Id), pi.ReconnectReason)
go r.rtcSessionWorker(room, participant, requestSource)
return nil
} else {