[Twisted-Python] deferreds and hung connections
Christopher Armstrong
radeex at gmail.com
Wed Mar 9 15:54:12 MST 2005
On Wed, 9 Mar 2005 11:17:58 -0800 (PST), Lenny G Arbage
<alengarbage at yahoo.com> wrote:
> > <Deferred #0>
> > Deferred #0 failed: 'Getting http://google.com
> > took longer than 0.001
> > seconds.'
> > >>>
>
> Thanks for the pointer, Jp. I just stumbled on some
> of the threads on the mailing list stretching back to
> as far as 2002 about whether being able to cancel
> Deferreds was a good idea or not.
>
> So the above solution works. Where do I catch, or
> otherwise react to, the error printed above? When the
> Deferred times out, is there a way to inject another
> callback in there ("timeoutcallback"?) so that I can
> do some processing on timeout?
It's just a regular errback. Handle it with d.addErrback(myHandler).
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | -- http://radix.twistedmatrix.com
| Release Manager, Twisted Project
\\\V/// | -- http://twistedmatrix.com
|o O| | Founding Member, Hobart Hacking Society
w----v----w-+ -- http://hackingsociety.org/chapters/hash
More information about the Twisted-Python
mailing list