[Twisted-Python] Inconsistency in ReconnectingClientFactory
albert.brandl at weiermayer.com
Wed Nov 3 08:01:14 EDT 2010
The ReconnectingClientFactory class allows to define the instance
variable maxDelay. Its documentation is "Maximum number of seconds
between connection attempts."
maxDelay is used in the retry() method to bound self.delay. But this
happens in the _first_ step of the calculation of self.delay.
Afterwards, the bounded value is modified again by applying
random.normalvariate to allow for the jitter. This can result in a value
that is considerably bigger than maxDelay.
Is there any reason that maxDelay is not used for bounding the final
result of the calculation of self.delay? If not, the calculation should
be fixed - I'd be happy to file an issue ;-).
Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster
phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56
More information about the Twisted-Python