imports/inspections

This commit is contained in:
David Colburn
2021-06-04 14:30:10 -05:00
parent c510ea2e1a
commit 5baf97e99b
7 changed files with 19 additions and 23 deletions
+2 -2
View File
@@ -4,9 +4,10 @@ import (
"sync"
"time"
"github.com/livekit/protocol/utils"
"github.com/livekit/livekit-server/pkg/logger"
livekit "github.com/livekit/livekit-server/proto"
"github.com/livekit/protocol/utils"
)
// a router of messages on the same node, basic implementation for local testing
@@ -121,7 +122,6 @@ func (r *LocalRouter) Start() error {
}
func (r *LocalRouter) Stop() {
r.rtcMessageChan.Close()
}
+2 -2
View File
@@ -361,7 +361,7 @@ func (r *RedisRouter) handleSignalMessage(sm *livekit.SignalNodeMessage) error {
switch rmb := sm.Message.(type) {
case *livekit.SignalNodeMessage_Response:
//logger.Debugw("forwarding signal message",
// logger.Debugw("forwarding signal message",
// "connectionId", connectionId,
// "type", fmt.Sprintf("%T", rmb.Response.Message))
if err := resSink.WriteMessage(rmb.Response); err != nil {
@@ -369,7 +369,7 @@ func (r *RedisRouter) handleSignalMessage(sm *livekit.SignalNodeMessage) error {
}
case *livekit.SignalNodeMessage_EndSession:
//logger.Debugw("received EndSession, closing signal connection",
// logger.Debugw("received EndSession, closing signal connection",
// "connectionId", connectionId)
resSink.Close()
}
+2 -3
View File
@@ -32,7 +32,7 @@ type DataTrack struct {
func NewDataTrack(trackId, participantId string, dc *webrtc.DataChannel) *DataTrack {
t := &DataTrack{
//ctx: context.Background(),
// ctx: context.Background(),
id: trackId,
name: dc.Label(),
participantId: participantId,
@@ -156,8 +156,7 @@ func (t *DataTrack) forwardWorker() {
for _, sub := range t.subscribers {
err := sub.SendMessage(msg)
if err != nil {
logger.Errorw("could not send data message",
err,
logger.Errorw("could not send data message", err,
"source", t.participantId,
"dest", sub.participantId)
}
+3 -3
View File
@@ -841,7 +841,7 @@ func (p *ParticipantImpl) handleTrackPublished(track types.PublishedTrack) {
}
func (p *ParticipantImpl) handlePublisherICEStateChange(state webrtc.ICEConnectionState) {
//logger.Debugw("ICE connection state changed", "state", state.String(),
// logger.Debugw("ICE connection state changed", "state", state.String(),
// "participant", p.identity)
if state == webrtc.ICEConnectionStateConnected {
p.updateState(livekit.ParticipantInfo_ACTIVE)
@@ -924,9 +924,9 @@ func (p *ParticipantImpl) rtcpSendWorker() {
if pkts == nil {
return
}
//for _, pkt := range pkts {
// for _, pkt := range pkts {
// logger.Debugw("writing RTCP", "packet", pkt)
//}
// }
if err := p.publisher.pc.WriteRTCP(pkts); err != nil {
logger.Errorw("could not write RTCP to participant", err,
"participant", p.Identity())
+2 -2
View File
@@ -370,7 +370,7 @@ func (r *RoomManager) rtcSessionWorker(room *rtc.Room, participant types.Partici
case *livekit.SignalRequest_Answer:
if participant.State() == livekit.ParticipantInfo_JOINING {
logger.Errorw("cannot negotiate before peer offer", nil, "participant", participant.Identity())
//conn.WriteJSON(jsonError(http.StatusNotAcceptable, "cannot negotiate before peer offer"))
// conn.WriteJSON(jsonError(http.StatusNotAcceptable, "cannot negotiate before peer offer"))
return
}
sd := rtc.FromProtoSessionDescription(msg.Answer)
@@ -383,7 +383,7 @@ func (r *RoomManager) rtcSessionWorker(room *rtc.Room, participant types.Partici
logger.Errorw("could not decode trickle", err, "participant", participant.Identity())
break
}
//logger.Debugw("adding peer candidate", "participant", participant.ID())
// logger.Debugw("adding peer candidate", "participant", participant.ID())
if err := participant.AddICECandidate(candidateInit, msg.Trickle.Target); err != nil {
logger.Errorw("could not handle trickle", err, "participant", participant.Identity())
}
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by Wire. DO NOT EDIT.
//go:generate wire
//go:generate go run github.com/google/wire/cmd/wire
//+build !wireinject
package service