[Twisted-Python] BUG: setting timeout on clientTCP() will invoke connectionFailed twice

Hi, The following code: -- from twisted.protocols.http import HTTPClient from twisted.internet import reactor class foo(HTTPClient): def connectionFailed(self): print "Failed" reactor.clientTCP("localhost", 8888, foo(), 2) reactor.run() -- Will print "Failed" twice. Without the timeout, only one "Failed" will be printed (of course make sure you connect to something that fails immediately when testing this :) It's kind of silly to keep te timeout after the connection has already failed - it should be cancelled, right? Cheers Ivo -- Drs. I.R. van der Wijk -=- Brouwersgracht 132 Amaze Internet Services V.O.F. 1013 HA Amsterdam, NL -=- T +31-20-4688336 F +31-20-4688337 Linux/Web/Zope/SQL/MMBase W http://www.amaze.nl E info@amaze.nl Network Solutions W http://vanderwijk.info E ivo@amaze.nl Consultancy PGP http://vanderwijk.info/pgp -=-
participants (1)
-
Ivo van der Wijk