[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 9a4e3e7bd97ba87255453a005b2a3474d1914621
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits