[Twisted-Python] TaskStopped error, unsure of the cause and solution

Itamar Turner-Trauring itamar at futurefoundries.com
Tue Feb 12 15:47:20 EST 2013

On Tue, Feb 12, 2013 at 2:30 PM, Paul Wiseman <poalman at gmail.com> wrote:

> I'm trying to reproduce it with a small twisted client and server,
> using a PUT request to send to the server but I can't seem to close
> the connection uncleanly. How would you recommend I do that? I've
> tried adding request.finish() on a callLater but that seems to finish
> the connection in a clean way. How can I close the connection in the
> way you suggest?

Maybe don't even go with real HTTP server, but something like:

class HTTP(Protocol):
    def connectionMade(self):
        self.transport.write("HTTP/1.0 200 OK\r\nContent-Length: 300000:

Or some variation on that, where you can control exactly where things break.

Itamar Turner-Trauring, Future Foundries LLC
http://futurefoundries.com/ — Twisted consulting, training and support.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20130212/3dc74980/attachment.htm 

More information about the Twisted-Python mailing list