Commit dbe29845 authored by Tim Peters's avatar Tim Peters

Port from Zope 2.7 branch.

After consulting with Mark Hammond, removed the explicit calls to SvcStop().

That method gets invoked automatically by the services framework when a
stop request is generated.  Calling it explicitly too caused the onStop()
method to get called multiple times.  At least ZRS's Service subclasses
have onStop() methods that can't be called multiple times without raising
exceptions (they shut things down, and stuff like sockets go away the
first time onStop() gets called).
parent 0070e935
......@@ -234,7 +234,6 @@ class Service(win32serviceutil.ServiceFramework):
win32event.INFINITE)
if rc == win32event.WAIT_OBJECT_0:
# user sent a stop service request
self.SvcStop()
keep_running = False
elif rc == win32event.WAIT_OBJECT_0 + 1:
# user did not send a service stop request, but
......@@ -261,7 +260,6 @@ class Service(win32serviceutil.ServiceFramework):
# this was an abormal shutdown.
if self.backoff_cumulative > BACKOFF_MAX:
self.error("restarting too frequently; quit")
self.SvcStop()
return False
self.warning("sleep %s to avoid rapid restarts"
% self.backoff_interval)
......
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