Agent request timeout
So far this is where I have got to.
In my timeout using callLater, I call d._canceller().
This calls _connectionLost_WAITING which is partly what I would expect. But
it does not call _canceller_WAITING which I would have expected as well.
The function at d._canceller would appear to be cancelConnection so I can
see why it would go to loseConnection right away. But I have not found
where cancelConnection resides yet.
The _connectLost_WAITING then calls disconnectParser and finally does the
errback with ResponseFailed and the connection is dropped cleanly.
The fact that _canceller_WAITING is not called makes me think I am making
the wrong call on the request deferred when I use d._canceller(), but I have
not seen anything else I can call.
Also d._canceller requires a parameter. And I can pass it anything and it
seems to not make use of any argument I pass in. I have used d the deferred,
None, 'TRANSMITTING' the string all with exactly the same effect.
So it makes me think I am making the wrong call on the request deferred.
Does anyone know if I should be calling some other function.
Below is the result from a test run outputting various points the program
runs through which might be helpful.
E:\jahtest>test_post.py
dispatcher
On Thu, Jul 7, 2011 at 9:31 AM, John Aherne
The fact that _canceller_WAITING is not called makes me think I am making the wrong call on the request deferred when I use d._canceller(), but I have not seen anything else I can call.
I'll admit to not knowing exactly what you're doing, but shouldn't you be calling d.cancel() not d._canceller() ? -- mithrandi, i Ainil en-Balandor, a faer Ambar
On Thu, Jul 7, 2011 at 10:44 AM, Tristan Seligmann
On Thu, Jul 7, 2011 at 9:31 AM, John Aherne
wrote: The fact that _canceller_WAITING is not called makes me think I am making the wrong call on the request deferred when I use d._canceller(), but I have not seen anything else I can call.
I'll admit to not knowing exactly what you're doing, but shouldn't you be calling d.cancel() not d._canceller() ?
You are correct of course. I started off using cancel() but was getting already called errors. So I started looking around to see what was going on and tried to trace through the various functions being called. That's how I ended up playing around with _canceller. What I did not do was find out what was really causing the already called errors. Which now you have prompted me I have sorted out. Typically something silly - like overriding the callLater functions. So sorry for all the noise over _canceller. Thanks John Aherne
participants (2)
-
John Aherne
-
Tristan Seligmann