r46851 - more conservative maxDelay.

glyph-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org
Newsgroups gmane.comp.python.twisted.commits
Message-ID <[email protected]>
Author: glyph
Date: Thu Feb 25 09:57:41 2016
New Revision: 46851

Modified:
   branches/persistent-client-service-4735-5/twisted/application/internet.py

Log:
more conservative maxDelay.

Modified: branches/persistent-client-service-4735-5/twisted/application/internet.py
==============================================================================
--- branches/persistent-client-service-4735-5/twisted/application/internet.py	(original)
+++ branches/persistent-client-service-4735-5/twisted/application/internet.py	Thu Feb 25 09:57:41 2016
@@ -490,7 +490,7 @@
 
 
 
-def backoffPolicy(initialDelay=1.0, maxDelay=3600.0, factor=1.5,
+def backoffPolicy(initialDelay=1.0, maxDelay=60.0, factor=1.5,
                   jitter=_goodEnoughRandom):
     """
     A timeout policy for L{ClientService} which computes an exponential backoff
@@ -498,18 +498,22 @@
 
     @param initialDelay: Delay for the first reconnection attempt (default
         1.0s).
+    @type initialDelay: L{float}
 
     @param maxDelay: Maximum number of seconds between connection attempts
-        (default 3600.0, or 1 hour).  Note that this value is before jitter is
-        applied, so the actual maximum possible delay is this value plus the
-        maximum possible result of C{jitter()}.
+        (default 60 seconds, or one minute).  Note that this value is before
+        jitter is applied, so the actual maximum possible delay is this value
+        plus the maximum possible result of C{jitter()}.
+    @type maxDelay: L{float}
 
     @param factor: A multiplicative factor by which the delay grows on each
         failed reattempt.  Default: 1.5.
+    @type factor: L{float}
 
     @param jitter: A 0-argument callable that introduces noise into the delay.
         By default, C{random.random}, i.e. a pseudorandom floating-point value
         between zero and one.
+    @type jitter: 0-argument callable returning L{float}
 
     @return: a 1-argument callable that, given an attempt count, returns a
         floating point number; the number of seconds to delay.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.