[or-cvs] r9159: Take out the '5 second' timeout from the connection retry sc (in tor/trunk: . doc src/or)

arma at seul.org arma at seul.org
Wed Dec 20 09:43:29 UTC 2006


Author: arma
Date: 2006-12-20 04:43:28 -0500 (Wed, 20 Dec 2006)
New Revision: 9159

Modified:
   tor/trunk/ChangeLog
   tor/trunk/doc/TODO
   tor/trunk/src/or/connection_edge.c
Log:
Take out the '5 second' timeout from the connection retry
schedule. Now the first connect attempt will wait a full 10
seconds before switching to a new circuit. Perhaps this will help
a lot. Based on observations from Mike Perry.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2006-12-20 09:25:58 UTC (rev 9158)
+++ tor/trunk/ChangeLog	2006-12-20 09:43:28 UTC (rev 9159)
@@ -50,6 +50,10 @@
       give up on a nameserver the third time it timed out, and try it
       10 seconds later... and to give up on it every time it timed out
       after that. (May fix bug 326.)
+    - Take out the '5 second' timeout from the connection retry
+      schedule. Now the first connect attempt will wait a full 10
+      seconds before switching to a new circuit. Perhaps this will help
+      a lot. Based on observations from Mike Perry.
 
   o Minor bugfixes:
     - Fix a bug when a PF socket is first used. (Patch from Fabian Keil.)

Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO	2006-12-20 09:25:58 UTC (rev 9158)
+++ tor/trunk/doc/TODO	2006-12-20 09:43:28 UTC (rev 9159)
@@ -124,7 +124,7 @@
         answer?
       - warn if all of your nameservers go down and stay down for like
         5 minutes.
-R - Take out the '5 second' timeout from the socks detach schedule.
+R o Take out the '5 second' timeout from the socks detach schedule.
 
   - Performance improvements
 

Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2006-12-20 09:25:58 UTC (rev 9158)
+++ tor/trunk/src/or/connection_edge.c	2006-12-20 09:43:28 UTC (rev 9159)
@@ -321,15 +321,13 @@
 
 /** Define a schedule for how long to wait between retrying
  * application connections. Rather than waiting a fixed amount of
- * time between each retry, we wait only 5 seconds for the first,
- * 10 seconds for the second, and 15 seconds for each retry after
+ * time between each retry, we wait 10 seconds each for the first
+ *  two tries, and 15 seconds for each retry after
  * that. Hopefully this will improve the expected user experience. */
 static int
 compute_socks_timeout(edge_connection_t *conn)
 {
-  if (conn->num_socks_retries == 0)
-    return 5;
-  if (conn->num_socks_retries == 1)
+  if (conn->num_socks_retries < 2) /* try 0 and try 1 */
     return 10;
   return 15;
 }



More information about the tor-commits mailing list