What happens in Tornado if an error occurs during

2019-08-02 17:43发布

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?

0条回答
登录 后发表回答