mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
log traffic bytes only once every few seconds, along with OnMessage & datachannel.Send counts, to prevent flooded logs
This commit is contained in:
parent
a1b7e01c54
commit
c4215b5614
3 changed files with 83 additions and 5 deletions
|
@ -24,6 +24,10 @@ func TestConnect(t *testing.T) {
|
|||
|
||||
Convey("WebRTC Connection", func() {
|
||||
c := new(webRTCConn)
|
||||
c.BytesInfo = &BytesInfo{
|
||||
inboundChan: make(chan int), outboundChan: make(chan int),
|
||||
inbound: 0, outbound: 0, inEvents: 0, outEvents: 0,
|
||||
}
|
||||
So(c.buffer.Bytes(), ShouldEqual, nil)
|
||||
|
||||
Convey("SendData buffers when datachannel is nil", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue