> On Oct 18, 2016, at 12:29 AM, John Aherne <johnahe...@rocs.co.uk> wrote:
> 
> Having read the irc log a few times I'm still not clear what is meant to 
> happen.
> 
> I can't see under what circumstances notifyFinish will return a Failure.

The difference between firing with None and firing with a Failure is extremely 
subtle.  If the client connection terminates "before it's ready" then you'll 
get an Failure, but this is fairly fuzzily defined in terms of 
application-level semantics.  A connection that is "not ready" to terminate 
might be one that has outstanding data to send to the client which the client 
doesn't receive, or a connection which has only partially received a request.  
There are other low-level details of the socket which might also be relevant 
(for example, I think you might also get this if the client neglects to send a 
CLOSE_ALERT TLS message).

For most applications, the difference between "failure" and "success" in this 
case just isn't very interesting.

As Corey identified earlier in the thread though, _also_ a bug where it isn't 
being called all the time when we expect it.  As the ticket said though, you 
can try to work around this by just calling resumeProducing() unconditionally 
at the beginning of your request processing...

-glyph



_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to