mirror of https://github.com/zulip/zulip.git
run-dev: Ignore certain request.finish() exceptions.
(imported from commit e797c0a6f5cd753bd84069bff202b421f0ff3be9)
This commit is contained in:
parent
33872fc427
commit
8879b84293
|
@ -9,6 +9,16 @@ from os import path
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
from twisted.web import proxy, server, resource
|
from twisted.web import proxy, server, resource
|
||||||
|
|
||||||
|
# Monkey-patch twisted.web.http to avoid request.finish exceptions
|
||||||
|
# https://trac.humbughq.com/ticket/1728
|
||||||
|
from twisted.web.http import Request
|
||||||
|
orig_finish = Request.finish
|
||||||
|
def patched_finish(self):
|
||||||
|
if self._disconnected:
|
||||||
|
return
|
||||||
|
return orig_finish(self)
|
||||||
|
Request.finish = patched_finish
|
||||||
|
|
||||||
parser = optparse.OptionParser(r"""
|
parser = optparse.OptionParser(r"""
|
||||||
|
|
||||||
Starts the app listening on localhost, for local development.
|
Starts the app listening on localhost, for local development.
|
||||||
|
|
Loading…
Reference in New Issue