treq
treq copied to clipboard
Errbacks fire on success when inside CooperativeTask loop
I am running a twisted beanstalkd client such as the example given in pybeanstalkd repo. The only difference is that in the executor callback I am just additionally making a normal treq POST request that registers both callback and errback.
Everything works smooth except that almost all (670 out of 685 or so I tested) successful requests also fire the errback, with the following error:
Failure instance: Traceback (failure with no frames):
<class 'twisted.web._newclient.RequestTransmissionFailed'>:
[<twisted.python.failure.Failure <class 'twisted.internet.error.ConnectionDone'>>
Here's further inspection of failure.value.reason:
Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
Is this related? http://comments.gmane.org/gmane.comp.python.twisted/25099