Skip to content
Snippets Groups Projects
Commit 788f2a59 authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

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
parent 799a13d3
No related branches found
No related tags found
No related merge requests found
......@@ -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++
......
......@@ -82,7 +82,7 @@ class WebExtUI extends UI
port.onDisconnect.addListener @onDisconnect
port.onMessage.addListener @onMessage
@postActive()
onMessage: (m) =>
@enabled = m.enabled
update()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment