mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Remove unused BytesSyncLogger.IsLogging.
This commit is contained in:
parent
d376d7036b
commit
9a4e3e7bd9
1 changed files with 0 additions and 8 deletions
|
@ -31,11 +31,9 @@ type BytesSyncLogger struct {
|
||||||
Inbound int
|
Inbound int
|
||||||
OutEvents int
|
OutEvents int
|
||||||
InEvents int
|
InEvents int
|
||||||
IsLogging bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BytesSyncLogger) Log() {
|
func (b *BytesSyncLogger) Log() {
|
||||||
b.IsLogging = true
|
|
||||||
var amount int
|
var amount int
|
||||||
output := func() {
|
output := func() {
|
||||||
log.Printf("Traffic Bytes (in|out): %d | %d -- (%d OnMessages, %d Sends)",
|
log.Printf("Traffic Bytes (in|out): %d | %d -- (%d OnMessages, %d Sends)",
|
||||||
|
@ -71,15 +69,9 @@ func (b *BytesSyncLogger) Log() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BytesSyncLogger) AddOutbound(amount int) {
|
func (b *BytesSyncLogger) AddOutbound(amount int) {
|
||||||
if !b.IsLogging {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
b.OutboundChan <- amount
|
b.OutboundChan <- amount
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BytesSyncLogger) AddInbound(amount int) {
|
func (b *BytesSyncLogger) AddInbound(amount int) {
|
||||||
if !b.IsLogging {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
b.InboundChan <- amount
|
b.InboundChan <- amount
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue