Browse Source

Shutdown CherryPy directly but gracefully without waiting 5 seconds

CP change to fix bug submitted as PR: https://github.com/cherrypy/cherrypy/pull/1528
pull/745/head
Safihre 9 years ago
parent
commit
d579c4d167
  1. 1
      SABnzbd.py
  2. 2
      cherrypy/wsgiserver/__init__.py

1
SABnzbd.py

@ -1445,6 +1445,7 @@ def main():
cherrypy.config.update({'server.environment': 'production',
'server.socket_host': cherryhost,
'server.socket_port': cherryport,
'server.shutdown_timeout': 0,
'log.screen': cherrylogtoscreen,
'engine.autoreload.frequency': 100,
'engine.autoreload.on': False,

2
cherrypy/wsgiserver/__init__.py

@ -1698,7 +1698,7 @@ class ThreadPool(object):
# Don't join currentThread (when stop is called inside a request).
current = threading.currentThread()
if timeout and timeout >= 0:
if timeout is not None and timeout >= 0:
endtime = time.time() + timeout
while self._threads:
worker = self._threads.pop()

Loading…
Cancel
Save