mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
timout for websocket connection failure
This commit is contained in:
parent
03b1a0d1f1
commit
14fc6a13c2
1 changed files with 4 additions and 0 deletions
|
@ -102,6 +102,10 @@ class ProxyPair
|
|||
@close()
|
||||
@relay.onerror = @onError
|
||||
@relay.onmessage = @onRelayToClientMessage
|
||||
# TODO: Better websocket timeout handling.
|
||||
setTimeout((=>
|
||||
log ws.label + ' timed out connecting.'
|
||||
@relay.onclose()), 5000)
|
||||
|
||||
# WebRTC --> websocket
|
||||
onClientToRelayMessage: (msg) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue