mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Stop logging debug message while counting down
This commit is contained in:
parent
898ba57070
commit
5aca6028f9
1 changed files with 8 additions and 7 deletions
|
@ -52,13 +52,14 @@ class Snowflake
|
||||||
# serving at capacity, at which point stop polling.
|
# serving at capacity, at which point stop polling.
|
||||||
pollBroker: ->
|
pollBroker: ->
|
||||||
# Temporary countdown. TODO: Simplify
|
# Temporary countdown. TODO: Simplify
|
||||||
countdown = (msg, sec) =>
|
countdown = (msg, sec, skip) =>
|
||||||
dbg msg
|
if not skip then dbg msg
|
||||||
@ui?.setStatus msg + ' (Polling in ' + sec + ' seconds...)'
|
if sec > 0
|
||||||
sec--
|
@ui?.setStatus msg + ' (Polling in ' + sec + ' seconds...)'
|
||||||
if sec >= 0
|
sec--
|
||||||
setTimeout((-> countdown(msg, sec)), 1000)
|
setTimeout((-> countdown(msg, sec, true)), 1000)
|
||||||
else
|
else
|
||||||
|
@ui?.setStatus msg
|
||||||
findClients()
|
findClients()
|
||||||
# Poll broker for clients.
|
# Poll broker for clients.
|
||||||
findClients = =>
|
findClients = =>
|
||||||
|
@ -67,7 +68,7 @@ class Snowflake
|
||||||
log 'At client capacity.'
|
log 'At client capacity.'
|
||||||
# Do nothing until a new proxyPair is available.
|
# Do nothing until a new proxyPair is available.
|
||||||
return
|
return
|
||||||
msg = 'polling for client... '
|
msg = 'Polling for client ... '
|
||||||
msg += '[retries: ' + @retries + ']' if @retries > 0
|
msg += '[retries: ' + @retries + ']' if @retries > 0
|
||||||
@ui?.setStatus msg
|
@ui?.setStatus msg
|
||||||
recv = @broker.getClientOffer pair.id
|
recv = @broker.getClientOffer pair.id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue