mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
simplify proxypair relay onclose
This commit is contained in:
parent
5e318b6219
commit
3339b9f172
2 changed files with 24 additions and 35 deletions
|
@ -131,13 +131,9 @@ class Snowflake
|
|||
pair.onCleanup = (event) =>
|
||||
# Delete from the list of active proxy pairs.
|
||||
@proxyPairs.splice(@proxyPairs.indexOf(pair), 1)
|
||||
try
|
||||
pair.begin()
|
||||
catch err
|
||||
log 'ERROR: ProxyPair exception while connecting.'
|
||||
log err
|
||||
return
|
||||
pair.begin()
|
||||
|
||||
# Stop all proxypairs.
|
||||
cease: ->
|
||||
while @proxyPairs.length > 0
|
||||
@proxyPairs.pop().close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue