Disconnections from websocket side also resets browser proxy

This commit is contained in:
Serene Han 2016-02-17 19:55:43 -08:00
parent 8a2e7a6041
commit e35687b587

View file

@ -63,7 +63,7 @@ class ProxyPair
@connectRelay() @connectRelay()
channel.onclose = -> channel.onclose = ->
log 'WebRTC DataChannel closed.' log 'WebRTC DataChannel closed.'
snowflake.ui.setStatus 'disconnected.' snowflake.ui.setStatus 'disconnected by webrtc.'
snowflake.ui.setActive false snowflake.ui.setActive false
snowflake.state = MODE.INIT snowflake.state = MODE.INIT
# Change this for multiplexing. # Change this for multiplexing.
@ -105,6 +105,9 @@ class ProxyPair
onClose: (event) => onClose: (event) =>
ws = event.target ws = event.target
log ws.label + ' closed.' log ws.label + ' closed.'
snowflake.ui.setStatus 'disconnected.'
snowflake.ui.setActive false
snowflake.state = MODE.INIT
@flush() @flush()
@maybeCleanup() @maybeCleanup()