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:
parent
29b3f2ab3b
commit
429db5b7d4
@ -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:
|
||||
|
@ -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()
|
||||
self.io_loop.stop()
|
Loading…
Reference in New Issue
Block a user