What happens in Tornado if an error occurs during streaming?

好久不见. 提交于 2019-12-24 10:25:05

问题


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?

来源:https://stackoverflow.com/questions/54226471/what-happens-in-tornado-if-an-error-occurs-during-streaming

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!