Commit 6077141f authored by David Fifield's avatar David Fifield
Browse files

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
12922a23, 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.
parent 25b304a9
......@@ -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 ---")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment