Commit ae2c1d38 authored by Hanno Schlichting's avatar Hanno Schlichting

Move _requestShutdown logic into ZServer.

parent 5a54bdff
......@@ -556,20 +556,15 @@ class HTTPResponse(BaseResponse):
return str(location)
# The following two methods are part of a private protocol with the
# publisher for handling fatal import errors and TTW shutdown requests.
# The following two methods are part of a private protocol with
# ZServer for handling fatal import errors.
_shutdown_flag = None
def _requestShutdown(self, exitCode=0):
""" Request that the server shut down with exitCode after fulfilling
the current request.
"""
self._shutdown_flag = 1
try:
from ZServer.Zope2.Startup import config
config.ZSERVER_EXIT_CODE = exitCode
except ImportError:
pass
self._shutdown_flag = exitCode
def _shutdownRequested(self):
""" Returns true if this request requested a server shutdown.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment