[Twisted-web] cancelling agent.request

John Aherne johnaherne at rocs.co.uk
Sat Jan 14 05:18:28 EST 2012

I have a situation where a service I am using will occasionally not respond
for considerable periods - hours not minutes.

I am using cooperate and yield to loop round a series of requests I want to

The actual function to send the request returns a deferred to the yield. I
add the callbacks onto this and set a calllater to fire in 30 seconds.

If that fires I can then cancel the deferred. But I think I ought to be
cancelling the request as well else I assume I will be leaking request
objects that might not get dealt with.

However, I can't see where I might cancel the request. Or should I be
dropping the connection associated with the request and if so where would I
be doing that.

Have I got that right?

Thanks for any info.

John Aherne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20120114/6375fa2a/attachment.htm 

More information about the Twisted-web mailing list