[tor-commits] [snowflake/master] Remove unused clientAddr from ProxyPair

arlo at torproject.org arlo at torproject.org
Mon Jan 23 20:34:36 UTC 2017


commit d1ec51bfb9aee014b848ad722c1f3ba7aa69124e
Author: Arlo Breault <arlolra at gmail.com>
Date:   Mon Jan 23 12:33:55 2017 -0800

    Remove unused clientAddr from ProxyPair
---
 proxy/proxypair.coffee           | 2 +-
 proxy/snowflake.coffee           | 2 +-
 proxy/spec/proxypair.spec.coffee | 3 +--
 proxy/spec/util.spec.coffee      | 3 +--
 4 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/proxy/proxypair.coffee b/proxy/proxypair.coffee
index d8253da..b19df09 100644
--- a/proxy/proxypair.coffee
+++ b/proxy/proxypair.coffee
@@ -22,7 +22,7 @@ class ProxyPair
   onCleanup:   null
   id:          null
 
-  constructor: (@clientAddr, @relayAddr, @rateLimit) ->
+  constructor: (@relayAddr, @rateLimit) ->
     @active = false
     @id = genSnowflakeID()
 
diff --git a/proxy/snowflake.coffee b/proxy/snowflake.coffee
index 629c776..0966053 100644
--- a/proxy/snowflake.coffee
+++ b/proxy/snowflake.coffee
@@ -143,7 +143,7 @@ class Snowflake
     .catch fail
 
   makeProxyPair: (relay) ->
-    pair = new ProxyPair null, relay, @rateLimit
+    pair = new ProxyPair relay, @rateLimit
     @proxyPairs.push pair
     pair.onCleanup = (event) =>
       # Delete from the list of active proxy pairs.
diff --git a/proxy/spec/proxypair.spec.coffee b/proxy/spec/proxypair.spec.coffee
index 162c0b4..992b53f 100644
--- a/proxy/spec/proxypair.spec.coffee
+++ b/proxy/spec/proxypair.spec.coffee
@@ -7,8 +7,7 @@ describe 'ProxyPair', ->
   fakeRelay = Parse.address '0.0.0.0:12345'
   rateLimit = new DummyRateLimit()
   destination = []
-  fakeClient = send: (d) -> destination.push d
-  pp = new ProxyPair(fakeClient, fakeRelay, rateLimit)
+  pp = new ProxyPair(fakeRelay, rateLimit)
 
   it 'begins webrtc connection', ->
     pp.begin()
diff --git a/proxy/spec/util.spec.coffee b/proxy/spec/util.spec.coffee
index 07b712b..4e5ab45 100644
--- a/proxy/spec/util.spec.coffee
+++ b/proxy/spec/util.spec.coffee
@@ -159,13 +159,12 @@ describe 'ProxyPair', ->
   fakeRelay = Parse.address '0.0.0.0:12345'
   rateLimit = new DummyRateLimit()
   destination = []
-  fakeClient = send: (d) -> destination.push d
   # Fake snowflake to interact with
   snowflake = {
     broker:
       sendAnswer: ->
   }
-  pp = new ProxyPair(fakeClient, fakeRelay, rateLimit)
+  pp = new ProxyPair(fakeRelay, rateLimit)
 
   it 'begins webrtc connection', ->
     pp.begin()



More information about the tor-commits mailing list