mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 23:11:29 -04:00
Status bar for the snowflake console, instead of cluttered log messages during
polling
This commit is contained in:
parent
cb505b6202
commit
30bfeb247e
4 changed files with 46 additions and 11 deletions
|
@ -53,12 +53,12 @@ class Broker
|
|||
when STATUS_OK
|
||||
fulfill xhr.responseText # Should contain offer.
|
||||
when STATUS_GATEWAY_TIMEOUT
|
||||
reject 'Timed out waiting for a client to serve. Retrying...'
|
||||
reject 'Timed out waiting for a client to serve.'
|
||||
else
|
||||
log 'Broker ERROR: Unexpected ' + xhr.status +
|
||||
' - ' + xhr.statusText
|
||||
Status.set ' failure. Please refresh.'
|
||||
xhr.send @id
|
||||
log @id + " - polling for client offer..."
|
||||
|
||||
sendAnswer: (answer) ->
|
||||
log @id + ' - Sending answer back to broker...\n'
|
||||
|
@ -81,4 +81,5 @@ class Broker
|
|||
else
|
||||
log 'Broker ERROR: Unexpected ' + xhr.status +
|
||||
' - ' + xhr.statusText
|
||||
Status.set ' failure. Please refresh.'
|
||||
xhr.send JSON.stringify(answer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue