1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Shutdown/restarts now wait for Tornado to finish shutting down before proceeding further

This commit is contained in:
echel0n 2014-07-30 18:57:31 -07:00
parent 29b3f2ab3b
commit 429db5b7d4
2 changed files with 6 additions and 4 deletions

View File

@ -482,8 +482,12 @@ class SickRage(object):
# shutdown web server
if self.webserver:
logger.log("Shutting down Tornado")
self.webserver.shutDown()
self.webserver = None
try:
self.webserver.join(10)
except:
pass
# if run as daemon delete the pidfile
if self.runAsDaemon and self.CREATEPID:

View File

@ -150,7 +150,5 @@ class SRWebServer(threading.Thread):
def shutDown(self):
self.alive = False
if self.server:
logger.log("Shutting down tornado")
self.server.stop()
self.io_loop.stop()
self.join()