mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
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.
This commit is contained in:
parent
25b304a9a8
commit
6077141f4a
1 changed files with 2 additions and 0 deletions
|
@ -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 ---")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue