Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce webrtc error log lvl #964

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading