mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Make badge and debug extend ui
Permits further ui extension
This commit is contained in:
parent
5b18729e77
commit
2b1852c1a5
6 changed files with 49 additions and 52 deletions
|
@ -55,11 +55,11 @@ class Snowflake
|
|||
countdown = (msg, sec, skip) =>
|
||||
if not skip then dbg msg
|
||||
if sec > 0
|
||||
@ui?.setStatus msg + ' (Polling in ' + sec + ' seconds...)'
|
||||
@ui.setStatus msg + ' (Polling in ' + sec + ' seconds...)'
|
||||
sec--
|
||||
setTimeout((-> countdown(msg, sec, true)), 1000)
|
||||
else
|
||||
@ui?.setStatus msg
|
||||
@ui.setStatus msg
|
||||
findClients()
|
||||
# Poll broker for clients.
|
||||
findClients = =>
|
||||
|
@ -70,7 +70,7 @@ class Snowflake
|
|||
return
|
||||
msg = 'Polling for client ... '
|
||||
msg += '[retries: ' + @retries + ']' if @retries > 0
|
||||
@ui?.setStatus msg
|
||||
@ui.setStatus msg
|
||||
recv = @broker.getClientOffer pair.id
|
||||
recv.then (desc) =>
|
||||
@receiveOffer pair, desc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue