[Twisted-web] Agent and timeouts
johnaherne at rocs.co.uk
Tue Jun 21 11:23:32 EDT 2011
I am using twisted.web.client.Agent to post sms messages
Occasionally I hit a problem where I do not get a response back.
I have looked around and seen various comments about timeouts with Agent.
One message had a comment that they had added an option to Agent to pass a
timeout parameter to the connect method.
But it would seem this only applies to getting connected. Once connected the
timeout is cleared.
I assume I would need to set up up some sort of callLater to fire in say 30
seconds and if the deferred has not fired, fire it with the timeout.
I assume I would also need to somehow drop the connection that is hung.
Now I am not too sure how I would do this with Agent and the request or
I imagine many people will have already solved this problem but have not
seen any info on how they went about this.
If someone could give me a few pointers as to what I should look at I would
appreciate it very much.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-web