[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Reduce the crossdomain timeout from 2.0 s to 0.5 s.



commit c04baba6de5ca0301ef3f3d9ddb868ad878cbb97
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Sun Oct 30 18:26:47 2011 -0700

    Reduce the crossdomain timeout from 2.0 s to 0.5 s.
    
    The public connector has logged 160 crossdomain connections since
    2011-09-05. The log entries only have a resolution of a second. That
    said, in only nine of those entries did the time advance by a second
    before the crossdomain request was received. This gives an estimate of
    the mean time before receiving a crossdomain request of 0.05625 s.
---
 connector.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/connector.py b/connector.py
index 624b776..3b08272 100755
--- a/connector.py
+++ b/connector.py
@@ -181,8 +181,11 @@ def format_peername(s):
         return "<unconnected>"
 
 # How long to wait for a crossdomain policy request before deciding that this is
-# a normal socket.
-CROSSDOMAIN_TIMEOUT = 2.0
+# a normal socket. In 160 crossdomain connections to the public facilitator, the
+# mean time before receiving a crossdomain request is only 0.05625 s. But that
+# was measured from log entries with a one-second resolution, so give a healthy
+# margin above that.
+CROSSDOMAIN_TIMEOUT = 0.5
 
 # Local socket, accepting SOCKS requests from localhost
 local_s = listen_socket(options.local_addr)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits