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]
This commit is contained in:
Arlo Breault 2016-03-18 14:22:34 -07:00
parent 2ac12c5b8d
commit cf1b0a49f1

View file

@ -226,4 +226,8 @@ window.onbeforeunload = ->
return CONFIRMATION_MESSAGE return CONFIRMATION_MESSAGE
null null
window.onunload = ->
pair.close() for pair in snowflake.proxyPairs
null
window.onload = init if window window.onload = init if window