mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
Fixed issue with threads not exiting on shutdown properly.
This commit is contained in:
parent
331be097cb
commit
b484192390
1 changed files with 7 additions and 8 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue