RequestHandler.on_connection_close()
Called in async handlers if the client closed the connection.
Override this to clean up resources associated with long-lived connections. Note that this method is called only if the connection was closed during asynchronous processing; if you need to do cleanup after every request override on_finish instead.
Proxies may keep a connection open for a time (perhaps indefinitely) after the client has gone away, so this method may not be called promptly after the end user closes their connection.
重写self.on_finish()
文档
客户端单方面终止连接要么就是给服务器发送finish消息,要不就得等服务器超时。要不然你单方面断了,服务器不可能一直傻等着浪费资源吧。。
http://www.tornadoweb.org/en/stable/web....