[snowflake/main] Wait pollInterval between proxy offers

21 Jul
2021
21 Jul
'21
2:38 p.m.
commit e3d376ca43db6420619afedfbc860a33e52d60bf Author: meskio <meskio@torproject.org> Date: Wed Jul 21 12:02:16 2021 +0200 Wait pollInterval between proxy offers Closes: #40055 --- proxy/snowflake.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proxy/snowflake.go b/proxy/snowflake.go index 78f226d..d694471 100644 --- a/proxy/snowflake.go +++ b/proxy/snowflake.go @@ -485,7 +485,10 @@ func main() { checkNATType(config, defaultProbeURL) log.Printf("NAT type: %s", currentNATType) - for { + ticker := time.NewTicker(pollInterval) + defer ticker.Stop() + + for ; true; <-ticker.C { tokens.get() sessionID := genSessionID() runSession(sessionID)
1404
Age (days ago)
1404
Last active (days ago)
0 comments
1 participants
participants (1)
-
meskio@torproject.org