Opened 5 years ago
#5132 enhancement new
twisted.web.template.flatten should accept a cancellation function
|Reported by:||amberite||Owned by:|
Since flatten calls request.write, if the request has already finished, e.g., user has disconnected, then flatten will raise an exception.
It would be useful if flatten accepted a cancellation function as part of its args; request.notifyFinish could then be used to trigger cancellation of the Deferred returned by flatten.