Merge pull request #718 from croneter/fix-unresponsive

Fix PKC crashing on resetting the database
This commit is contained in:
croneter 2019-02-08 15:36:48 +01:00 committed by GitHub
commit b31a2c6b35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,7 +126,10 @@ class Sync(backgroundthread.KillableThread):
utils.ERROR(txt='sync.py crashed', notify=True)
raise
finally:
try:
app.APP.deregister_thread(self)
except ValueError:
pass
LOG.info("###===--- Sync Thread Stopped ---===###")
def _run_internal(self):
@ -146,6 +149,8 @@ class Sync(backgroundthread.KillableThread):
v.MIN_DB_VERSION):
LOG.warn("Db version out of date: %s minimum version "
"required: %s", current_version, v.MIN_DB_VERSION)
# In order to not wait for this thread to suspend
app.APP.deregister_thread(self)
# DB out of date. Proceed to recreate?
if not utils.yesno_dialog(utils.lang(29999),
utils.lang(39401)):