]> git.ipfire.org Git - thirdparty/tornado.git/commit
Use 'future_add_done_callback' to add callback. 2549/head
authorgarenchan <1412950785@qq.com>
Mon, 10 Dec 2018 11:16:38 +0000 (19:16 +0800)
committergarenchan <1412950785@qq.com>
Mon, 10 Dec 2018 11:39:12 +0000 (19:39 +0800)
commit9a4a6ce9aeed9c4177a5b62db20857eb60a0f112
tree2f1dbd81ba3d4e3a13a3e39411b00a4626907dbd
parentc350dc9f4dfca5ede1002fa578cc33d6b1cea120
Use 'future_add_done_callback' to add callback.
The PR #2449 was incomplete, it omited consideration of another
branch of the 'flush' method. In short, the future returned by
'RequestHandler.finish()' may also be the return value of
'HTTP1Connection.write()'. So we should make the same change to
'HTTP1Connection.write()'.

Fix #2448.
tornado/http1connection.py
tornado/test/web_test.py