I'm writing a streaming POST request handler in Tornado, using the @stream_request_body
class decorator and implementing the data_received
method to handle chunked data. I have some resources that I want to ensure are closed when the request has been serviced.
If an error occurs within data_received
, I can catch the exception, clean up resources and call send_error
. But what happens if the connection is closed by the client? Does post
get called in that case?