[tor-commits] [snowflake/master] timout for websocket connection failure
arlo at torproject.org
arlo at torproject.org
Tue Apr 5 17:29:43 UTC 2016
commit 14fc6a13c2f8833c3fd608d0f2dd1220a64f12e0
Author: Serene Han <keroserene+git at gmail.com>
Date: Thu Mar 31 22:48:19 2016 -0700
timout for websocket connection failure
---
proxy/proxypair.coffee | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/proxy/proxypair.coffee b/proxy/proxypair.coffee
index 3ed6c6c..20cbbb5 100644
--- a/proxy/proxypair.coffee
+++ b/proxy/proxypair.coffee
@@ -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) =>
More information about the tor-commits
mailing list