Log ICE candidates to debug TCP connection issues. (#2658)

This commit is contained in:
Raja Subramanian
2024-04-17 09:45:10 +05:30
committed by GitHub
parent 6afa63ded3
commit 14b934a780
3 changed files with 27 additions and 16 deletions
+4
View File
@@ -22,6 +22,7 @@ import (
"github.com/pion/webrtc/v3"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/psrpc"
"github.com/livekit/livekit-server/pkg/routing"
@@ -254,6 +255,9 @@ func (p *ParticipantImpl) sendDisconnectUpdatesForReconnect() error {
func (p *ParticipantImpl) sendICECandidate(c *webrtc.ICECandidate, target livekit.SignalTarget) error {
trickle := ToProtoTrickle(c.ToJSON())
trickle.Target = target
p.params.Logger.Debugw("sending ICE candidate", "transport", target, "trickle", logger.Proto(trickle))
return p.writeMessage(&livekit.SignalResponse{
Message: &livekit.SignalResponse_Trickle{
Trickle: trickle,