]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Return a Future from finish method of RequestHandler
authorluojiebin <luo.jiebin@qq.com>
Fri, 15 Dec 2017 17:10:32 +0000 (01:10 +0800)
committerBen Darnell <ben@bendarnell.com>
Sun, 20 May 2018 00:46:02 +0000 (20:46 -0400)
tornado/web.py

index f970bd1306886319ff8eba6688326c0e2b6b578e..3ce507f3d45f3c985538cbe2ebec26e8712a3341 100644 (file)
@@ -1025,12 +1025,13 @@ class RequestHandler(object):
             # are keepalive connections)
             self.request.connection.set_close_callback(None)
 
-        self.flush(include_footers=True)
+        future = self.flush(include_footers=True)
         self.request.connection.finish()
         self._log()
         self._finished = True
         self.on_finish()
         self._break_cycles()
+        return future
 
     def detach(self):
         """Take control of the underlying stream.