[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake/master] Log to io.Discard if no log file is set.
commit 6077141f4affdab9b7ce97a9b1c6859825eaaa29
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Sun Jun 10 16:41:32 2018 -0700
Log to io.Discard if no log file is set.
https://bugs.torproject.org/25600#comment:14
Snowflake in Tor Browser has been hanging after surfing for a while.
(Tor reports "no running bridges".) It only began happening after commit
12922a232b, which caused snowflake-client not to log to a file by
default (leaving it to log to its default stderr). What seems to be
happening is that tor doesn't read from its PT clients' stderr, leaving
a buffer to fill up that eventually causes a hang.
---
client/snowflake.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/client/snowflake.go b/client/snowflake.go
index e0f9746..a9841be 100644
--- a/client/snowflake.go
+++ b/client/snowflake.go
@@ -150,6 +150,8 @@ func main() {
}
defer logFile.Close()
log.SetOutput(logFile)
+ } else {
+ log.SetOutput(ioutil.Discard)
}
log.Println("\n\n\n --- Starting Snowflake Client ---")
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits