mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Fixed linting errors/warnings and tests
The test failure was due to pollBorker waiting the full 5 seconds before polling for the first time. The lint errors were some trailing whitespace and unecessary fat arrows
This commit is contained in:
parent
799a13d385
commit
788f2a595f
2 changed files with 6 additions and 4 deletions
|
@ -55,7 +55,9 @@ class Snowflake
|
|||
@makeProxyPair @relayAddr
|
||||
log 'ProxyPair Slots: ' + @proxyPairs.length
|
||||
log 'Snowflake IDs: ' + (@proxyPairs.map (p) -> p.id).join ' | '
|
||||
@pollInterval = setInterval((=> @pollBroker()), config.defaultBrokerPollInterval)
|
||||
@pollBroker()
|
||||
@pollInterval = setInterval((=> @pollBroker()),
|
||||
config.defaultBrokerPollInterval)
|
||||
log @pollInterval
|
||||
|
||||
# Regularly poll Broker for clients to serve until this snowflake is
|
||||
|
@ -72,9 +74,9 @@ class Snowflake
|
|||
msg += '[retries: ' + @retries + ']' if @retries > 0
|
||||
@ui.setStatus msg
|
||||
recv = @broker.getClientOffer pair.id
|
||||
recv.then (desc) =>
|
||||
recv.then (desc) ->
|
||||
@receiveOffer pair, desc
|
||||
, (err) =>
|
||||
, (err) ->
|
||||
pair.active = false
|
||||
@retries++
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue