mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Make timeout constants into time.Duration values.
This slightly changes some log messages.
This commit is contained in:
parent
dfb83c6606
commit
a2292ce35b
3 changed files with 10 additions and 9 deletions
|
@ -31,11 +31,11 @@ func ConnectLoop(snowflakes sf.SnowflakeCollector) {
|
|||
// Check if ending is necessary.
|
||||
_, err := snowflakes.Collect()
|
||||
if err != nil {
|
||||
log.Printf("WebRTC: %v Retrying in %v seconds...",
|
||||
log.Printf("WebRTC: %v Retrying in %v...",
|
||||
err, sf.ReconnectTimeout)
|
||||
}
|
||||
select {
|
||||
case <-time.After(time.Second * sf.ReconnectTimeout):
|
||||
case <-time.After(sf.ReconnectTimeout):
|
||||
continue
|
||||
case <-snowflakes.Melted():
|
||||
log.Println("ConnectLoop: stopped.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue