diff --git a/api/webrtc/webrtc.go b/api/webrtc/webrtc.go index ac76d382..84160c91 100644 --- a/api/webrtc/webrtc.go +++ b/api/webrtc/webrtc.go @@ -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 @@ -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}) @@ -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()) }) }) diff --git a/api/websocket/server/relay.go b/api/websocket/server/relay.go index d3bb83b6..fa9bdce7 100644 --- a/api/websocket/server/relay.go +++ b/api/websocket/server/relay.go @@ -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 } diff --git a/api/websocket/server/wsserver.go b/api/websocket/server/wsserver.go index f9176216..5236e90d 100644 --- a/api/websocket/server/wsserver.go +++ b/api/websocket/server/wsserver.go @@ -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