create signalStats from out of order join (#1640)

This commit is contained in:
Paul Wells
2023-04-20 03:27:41 -07:00
committed by GitHub
parent 09af509edb
commit 70041f004f
2 changed files with 9 additions and 3 deletions
+8
View File
@@ -302,6 +302,14 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
pLogger.Debugw("sending answer", "answer", m)
}
if pi.ID == "" && res.GetJoin() != nil {
pi.ID = livekit.ParticipantID(res.GetJoin().GetParticipant().GetSid())
signalStats = telemetry.NewBytesTrackStats(
telemetry.BytesTrackIDForParticipantID(telemetry.BytesTrackTypeSignal, pi.ID),
pi.ID,
s.telemetry)
}
if count, err := sigConn.WriteResponse(res); err != nil {
pLogger.Warnw("error writing to websocket", err)
return