commit e3d376ca43db6420619afedfbc860a33e52d60bf
Author: meskio <[email protected]>
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)

_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to