<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div>So far this is where I have got to.</div><div><br></div><div>In my timeout using callLater, I call d._canceller().</div>
<div><br></div><div>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.</div><div><br></div><div>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.</div>
<div><br></div><div>The _connectLost_WAITING then calls disconnectParser and finally does the errback with ResponseFailed and the connection is dropped cleanly.</div><div><br></div><div>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.</div>
<div><br></div><div>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, &#39;TRANSMITTING&#39; the string all with exactly the same effect.</div>
<div><br></div><div>So it makes me think I am making the wrong call on the request deferred.</div><div><br></div><div>Does anyone know if I should be calling some other function.</div><div><br></div><div>Below is the result from a test run outputting various points the program runs through which might be helpful.</div>
<div><br></div><div><div><br></div><div>E:\jahtest&gt;test_post.py</div><div>dispatcher &lt;function dispatcher at 0x00FD57B0&gt; template &lt;function deliverBody at</div><div> 0x00FD5770&gt;</div><div>dispatcher &lt;function dispatcher at 0x00FD58F0&gt; template &lt;function _bodyDataRecei</div>
<div>ved at 0x00FD58B0&gt;</div><div>dispatcher &lt;function dispatcher at 0x00FD5A30&gt; template &lt;function _bodyDataFinis</div><div>hed at 0x00FD59F0&gt;</div><div>dispatcher &lt;function dispatcher at 0x00FD5F70&gt; template &lt;function _canceller at</div>
<div>0x00FD5F30&gt;</div><div>dispatcher &lt;function dispatcher at 0x00FD9170&gt; template &lt;function connectionLost</div><div> at 0x00FD9130&gt;</div><div>body &lt;stringprod_resp.StringProducer object at 0x00F9BCB0&gt;</div>
<div>fff canceller &lt;function cancelConnect at 0x00FD95B0&gt;</div><div>got do cancel</div><div>connectionlost waiting [Failure instance: Traceback (failure with no frames): &lt;c</div><div>lass &#39;twisted.internet.error.ConnectionDone&#39;&gt;: Connection was closed cleanly.</div>
<div>]</div><div>disconnect parser [Failure instance: Traceback (failure with no frames): &lt;class</div><div>&#39;twisted.internet.error.ConnectionDone&#39;&gt;: Connection was closed cleanly.</div><div>]</div><div>got error &lt;bound method Failure.getErrorMessage of &lt;twisted.python.failure.Failu</div>
<div>re &lt;class &#39;twisted.web._newclient.ResponseFailed&#39;&gt;&gt;&gt;</div><div><br></div></div><div><br></div><div>Thanks for any info.</div><div><br></div><div>John Aherne</div><div><br></div></span>