[Twisted-web] twisted web write to a connection closed from client-side

Andrew Gryaznov realgrandrew at gmail.com
Fri Dec 11 17:51:02 EST 2009


Hi,

I have a problem: twisted does not indicate/throw exception when user
has stopped reading the stream via "STOP" browser button (I guess it
won't do in any other case of connection drop). Is this intended
behavior and is there any way to detect that the data written to
request goes nowhere?

I am using twisted web to write HTTP stream that is read form
asynchronous source continuously. I'm using Resource and
NOT_READY_YET, then I just do request.write() infinitely until, and
if, the source stops the stream, then do request.finish().
If the source does not stop and I stop the stream by hitting browser
"stop" button - the twisted server continues reading source
infinitely.

Could not find any information about how connection resets are handled
by twisted web



More information about the Twisted-web mailing list