From e35687b587f219e8c1b1323e09765b3ec85daf69 Mon Sep 17 00:00:00 2001 From: Serene Han Date: Wed, 17 Feb 2016 19:55:43 -0800 Subject: [PATCH] Disconnections from websocket side also resets browser proxy --- proxy/proxypair.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proxy/proxypair.coffee b/proxy/proxypair.coffee index e7adfb9..b8db513 100644 --- a/proxy/proxypair.coffee +++ b/proxy/proxypair.coffee @@ -63,7 +63,7 @@ class ProxyPair @connectRelay() channel.onclose = -> log 'WebRTC DataChannel closed.' - snowflake.ui.setStatus 'disconnected.' + snowflake.ui.setStatus 'disconnected by webrtc.' snowflake.ui.setActive false snowflake.state = MODE.INIT # Change this for multiplexing. @@ -105,6 +105,9 @@ class ProxyPair onClose: (event) => ws = event.target log ws.label + ' closed.' + snowflake.ui.setStatus 'disconnected.' + snowflake.ui.setActive false + snowflake.state = MODE.INIT @flush() @maybeCleanup()