treq icon indicating copy to clipboard operation
treq copied to clipboard

Errbacks fire on success when inside CooperativeTask loop

Open petri opened this issue 10 years ago • 1 comments

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.

petri avatar Jun 13 '15 13:06 petri

Is this related? http://comments.gmane.org/gmane.comp.python.twisted/25099

petri avatar Jun 13 '15 14:06 petri