[Twisted-Python] TimeoutError in BaseConnector

Hey all, I have an issue with the following in t.i.base.BaseConnector: if self.timeout is not None: self.timeoutID = self.reactor.callLater(self.timeout, transport.failIfNotConnected, error.TimeoutError()) Might it be more useful and less misleading to describe this a little more? I was quite perplexed at an unexpected timeout error, until I realized it was being generated by the connector. I kept getting this message: User timeout caused connection failure. While technically true, I was mislead but the "User timeout" bit, and it took me a while to get my bearings, quit futzing with the factory and protocol settings, and track this down. I made the following change in my local t.i.base: if self.timeout is not None: self.timeoutID = self.reactor.callLater(self.timeout, transport.failIfNotConnected, error.TimeoutError("Could not connect after %s seconds" % self.timeout)) This results in the less cryptic: "User timeout caused connection failure: Could not connect after 30 seconds." Shall I submit a patch in trac? Thanks, d

On Jan 21, 2006, at 6:09 PM, Duncan McGreggor wrote:
Hmm. The more I think about this, the more I'm willing to quibble about "User timeout" being used here. It may be a matter of semantics, but I have always perceived the "user end" to be with factories/clients/protocols. This isn't that end at all... it's the reactor/connector end. Should this be called a "User timeout"? What about "Connector timeout"?

On Sat, 21 Jan 2006 18:09:56 -0700, Duncan McGreggor <duncan.mcgreggor@gmail.com> wrote:
[snip]
Shall I submit a patch in trac?
In any event, bugs should not be filed in trac. They should be filed at <http://twistedmatrix.com/bugs/>. Jean-Paul

On Jan 21, 2006, at 6:09 PM, Duncan McGreggor wrote:
Hmm. The more I think about this, the more I'm willing to quibble about "User timeout" being used here. It may be a matter of semantics, but I have always perceived the "user end" to be with factories/clients/protocols. This isn't that end at all... it's the reactor/connector end. Should this be called a "User timeout"? What about "Connector timeout"?

On Sat, 21 Jan 2006 18:09:56 -0700, Duncan McGreggor <duncan.mcgreggor@gmail.com> wrote:
[snip]
Shall I submit a patch in trac?
In any event, bugs should not be filed in trac. They should be filed at <http://twistedmatrix.com/bugs/>. Jean-Paul
participants (2)
-
Duncan McGreggor
-
Jean-Paul Calderone