Commits

Robert Brewer  committed 76e0eb6

Backport of [2110] (FCGI tweak to help it shut down).

  • Participants
  • Parent commits 13613ea
  • Branches cherrypy-3.1.x

Comments (0)

Files changed (1)

File cherrypy/process/servers.py

     
     def stop(self):
         """Stop the HTTP server."""
-        self.ready = False
         # Forcibly stop the fcgi server main event loop.
         self.fcgiserver._keepGoing = False
         # Force all worker threads to die off.
-        self.fcgiserver._threadPool.maxSpare = 0
+        self.fcgiserver._threadPool.maxSpare = self.fcgiserver._threadPool._idleCount
+        self.ready = False
 
 
 class FlupSCGIServer(object):