mirror of https://github.com/zulip/zulip.git
run-dev: Remove unnecessary finish calls.
Tornado finishes the request automatically. Avoids this error, hidden
until commit 81f7192ca3
(#22301), when
the browser tab is closed:
Traceback (most recent call last):
File "/srv/zulip-py3-venv/lib/python3.8/site-packages/tornado/web.py", line 1683, in _execute
result = await result
File "tools/run-dev.py", line 280, in prepare
await self.finish()
tornado.iostream.StreamClosedError: Stream is closed
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
0dfde9db94
commit
d5c302feef
|
@ -277,11 +277,9 @@ class BaseHandler(web.RequestHandler):
|
|||
self.add_header(header, v)
|
||||
if response.body:
|
||||
self.write(response.body)
|
||||
await self.finish()
|
||||
except (ConnectionError, httpclient.HTTPError) as e:
|
||||
self.set_status(500)
|
||||
self.write("Internal server error:\n" + str(e))
|
||||
await self.finish()
|
||||
|
||||
|
||||
class WebPackHandler(BaseHandler):
|
||||
|
|
Loading…
Reference in New Issue