Move querystring access to init

This commit is contained in:
Arlo Breault 2019-05-08 14:08:22 -04:00
parent 3839c2e0b1
commit edbbea1d03
3 changed files with 11 additions and 13 deletions

View file

@ -22,14 +22,10 @@ class Snowflake
WEBRTC_READY: 2
# Prepare the Snowflake with a Broker (to find clients) and optional UI.
constructor: (@broker, @ui) ->
constructor: (@broker, @ui, rateLimitBytes) ->
@state = Snowflake.MODE.INIT
@proxyPairs = []
rateLimitBytes = undefined
if 'off' != query['ratelimit']
rateLimitBytes = Params.getByteCount(query, 'ratelimit',
DEFAULT_RATE_LIMIT)
if undefined == rateLimitBytes
@rateLimit = new DummyRateLimit()
else