mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Remove unecessary log messages
Ever since we started scrubbing log messages, with the help of regexes for https://bugs.torproject.org/21304 logging has become more CPU intensive due to our use of regular expressions. Logging the byte count of every incoming and outgoing message at the proxy-go instances was taking up a lot of CPU and contrubuting to the high CPU usage seen in https://bugs.torproject.org/33211.
This commit is contained in:
parent
c2a12c25d1
commit
2e9e807178
1 changed files with 0 additions and 3 deletions
|
@ -90,8 +90,6 @@ func (c *webRTCConn) Read(b []byte) (int, error) {
|
||||||
func (c *webRTCConn) Write(b []byte) (int, error) {
|
func (c *webRTCConn) Write(b []byte) (int, error) {
|
||||||
c.lock.Lock()
|
c.lock.Lock()
|
||||||
defer c.lock.Unlock()
|
defer c.lock.Unlock()
|
||||||
// log.Printf("webrtc Write %d %+q", len(b), string(b))
|
|
||||||
log.Printf("Write %d bytes --> WebRTC", len(b))
|
|
||||||
if c.dc != nil {
|
if c.dc != nil {
|
||||||
c.dc.Send(b)
|
c.dc.Send(b)
|
||||||
}
|
}
|
||||||
|
@ -320,7 +318,6 @@ func makePeerConnectionFromOffer(sdp *webrtc.SessionDescription, config webrtc.C
|
||||||
pw.Close()
|
pw.Close()
|
||||||
})
|
})
|
||||||
dc.OnMessage(func(msg webrtc.DataChannelMessage) {
|
dc.OnMessage(func(msg webrtc.DataChannelMessage) {
|
||||||
log.Printf("OnMessage <--- %d bytes", len(msg.Data))
|
|
||||||
var n int
|
var n int
|
||||||
n, err = pw.Write(msg.Data)
|
n, err = pw.Write(msg.Data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue