Fixed issue with threads not exiting on shutdown properly.

This commit is contained in:
echel0n 2014-07-28 17:40:11 -07:00
parent 331be097cb
commit b484192390
1 changed files with 7 additions and 8 deletions

View File

@ -1171,13 +1171,6 @@ def halt():
logger.log(u"Aborting all threads")
events.stop.set()
logger.log(u"Waiting for the EVENTS thread to exit")
try:
events.join()
except:
pass
dailySearchScheduler.stop.set()
logger.log(u"Waiting for the DAILYSEARCH thread to exit")
try:
@ -1256,10 +1249,16 @@ def halt():
except:
pass
events.stop.set()
logger.log(u"Waiting for the EVENTS thread to exit")
try:
events.join(10)
except:
pass
__INITIALIZED__ = False
started = False
def sig_handler(signum=None, frame=None):
if type(signum) != type(None):
logger.log(u"Signal %i caught, saving and exiting..." % int(signum))