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
|
@makeProxyPair @relayAddr
|
||||||
log 'ProxyPair Slots: ' + @proxyPairs.length
|
log 'ProxyPair Slots: ' + @proxyPairs.length
|
||||||
log 'Snowflake IDs: ' + (@proxyPairs.map (p) -> p.id).join ' | '
|
log 'Snowflake IDs: ' + (@proxyPairs.map (p) -> p.id).join ' | '
|
||||||
@pollInterval = setInterval((=> @pollBroker()), config.defaultBrokerPollInterval)
|
@pollBroker()
|
||||||
|
@pollInterval = setInterval((=> @pollBroker()),
|
||||||
|
config.defaultBrokerPollInterval)
|
||||||
log @pollInterval
|
log @pollInterval
|
||||||
|
|
||||||
# Regularly poll Broker for clients to serve until this snowflake is
|
# Regularly poll Broker for clients to serve until this snowflake is
|
||||||
|
@ -72,9 +74,9 @@ class Snowflake
|
||||||
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
|
||||||
recv.then (desc) =>
|
recv.then (desc) ->
|
||||||
@receiveOffer pair, desc
|
@receiveOffer pair, desc
|
||||||
, (err) =>
|
, (err) ->
|
||||||
pair.active = false
|
pair.active = false
|
||||||
@retries++
|
@retries++
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue