[tor-commits] [snowflake/master] Close connections before unloading
arlo at torproject.org
arlo at torproject.org
Fri Mar 18 21:25:16 UTC 2016
commit cf1b0a49f13f2550cad1b32ef4e4820b4c26bcf1
Author: Arlo Breault <arlolra at gmail.com>
Date: Fri Mar 18 14:22:34 2016 -0700
Close connections before unloading
Noticed a long delay after the window closed before the datachannel
timed out.
2016/03/18 13:53:16 Traffic Bytes (in|out): 202576 | 8087
2016/03/18 13:58:10 WebRTC: DataChannel.OnClose [remotely]
---
proxy/snowflake.coffee | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/proxy/snowflake.coffee b/proxy/snowflake.coffee
index eff96de..7e26481 100644
--- a/proxy/snowflake.coffee
+++ b/proxy/snowflake.coffee
@@ -226,4 +226,8 @@ window.onbeforeunload = ->
return CONFIRMATION_MESSAGE
null
+window.onunload = ->
+ pair.close() for pair in snowflake.proxyPairs
+ null
+
window.onload = init if window
More information about the tor-commits
mailing list