Skip to content

Commit

Permalink
reduce webrtc error log lvl
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed May 8, 2024
1 parent d8381da commit 9e1cce1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions api/webrtc/webrtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (c *Peer) Offer(label string) error {
return err
}
dc.OnOpen(func() {
log.Debugf("data channel %v has been opened\n", dc.Label())
log.Debugf("Data channel %v has been opened\n", dc.Label())
c.mutex.Lock()
defer c.mutex.Unlock()
c.isConnected = true
Expand Down Expand Up @@ -133,7 +133,7 @@ func (c *Peer) Offer(label string) error {
})

dc.OnError(func(err error) {
log.Errorf("Data Channel %s error: %s\n", dc.Label(), err.Error())
log.Debugf("Data channel %s error: %s\n", dc.Label(), err.Error())
})

offer, err := c.pc.CreateOffer(&webrtc.OfferOptions{ICERestart: false})
Expand Down Expand Up @@ -232,7 +232,7 @@ func (c *Peer) Answer(offerSdp string) error {
})

dc.OnError(func(err error) {
log.Errorf("Data Channel %v error: %s\n", dc.Label(), err.Error())
log.Debugf("Data channel %v error: %s\n", dc.Label(), err.Error())
})
})

Expand Down
2 changes: 1 addition & 1 deletion api/websocket/server/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (ms *MsgServer) sendInboundMessage(clientID string, inboundMsg *pb.InboundM

err = client.SendBinary(buf)
if err != nil {
log.Error("Send to client error: ", err)
log.Debugf("Send to client error: %v", err)
continue
}

Expand Down
4 changes: 0 additions & 4 deletions api/websocket/server/wsserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import (
"github.com/nknorg/nkn/v2/util/log"
)

// type conn interface {
// Start(s *MsgServer, wssCertReady chan struct{}) error
// }

type wsServer struct {
s *MsgServer
Upgrader websocket.Upgrader
Expand Down

0 comments on commit 9e1cce1

Please sign in to comment.