[tor-commits] [snowflake/master] Remove unused BytesSyncLogger.IsLogging.

dcf at torproject.org dcf at torproject.org
Fri Apr 24 16:27:06 UTC 2020


commit 9a4e3e7bd97ba87255453a005b2a3474d1914621
Author: David Fifield <david at bamsoftware.com>
Date:   Thu Apr 23 21:12:45 2020 -0600

    Remove unused BytesSyncLogger.IsLogging.
---
 client/lib/util.go | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/client/lib/util.go b/client/lib/util.go
index cacf1d7..8ac0213 100644
--- a/client/lib/util.go
+++ b/client/lib/util.go
@@ -31,11 +31,9 @@ type BytesSyncLogger struct {
 	Inbound      int
 	OutEvents    int
 	InEvents     int
-	IsLogging    bool
 }
 
 func (b *BytesSyncLogger) Log() {
-	b.IsLogging = true
 	var amount int
 	output := func() {
 		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) {
-	if !b.IsLogging {
-		return
-	}
 	b.OutboundChan <- amount
 }
 
 func (b *BytesSyncLogger) AddInbound(amount int) {
-	if !b.IsLogging {
-		return
-	}
 	b.InboundChan <- amount
 }





More information about the tor-commits mailing list