tornado: Add missing await for finish calls.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-05-31 16:35:08 -07:00
committed by Tim Abbott
parent 6cfb00fabc
commit 81f7192ca3
2 changed files with 7 additions and 7 deletions

View File

@@ -277,11 +277,11 @@ class BaseHandler(web.RequestHandler):
self.add_header(header, v)
if response.body:
self.write(response.body)
self.finish()
await self.finish()
except (ConnectionError, httpclient.HTTPError) as e:
self.set_status(500)
self.write("Internal server error:\n" + str(e))
self.finish()
await self.finish()
class WebPackHandler(BaseHandler):