+ re-added old pow system as a different class for things like ed25519 keys

* no longer run communicator threads if they need peers and we have none connected
This commit is contained in:
Kevin Froman 2018-07-09 02:02:33 -05:00
parent f027202ac9
commit b3b5e5bb50
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
5 changed files with 140 additions and 28 deletions

View file

@ -25,7 +25,7 @@ import sys
if sys.version_info[0] == 2 or sys.version_info[1] < 5:
print('Error, Onionr requires Python 3.4+')
sys.exit(1)
import os, base64, random, getpass, shutil, subprocess, requests, time, platform, datetime, re, json, getpass
import os, base64, random, getpass, shutil, subprocess, requests, time, platform, datetime, re, json, getpass, sqlite3
from threading import Thread
import api, core, config, logger, onionrplugins as plugins, onionrevents as events
import onionrutils
@ -604,7 +604,11 @@ class Onionr:
try:
events.event('daemon_stop', onionr = self)
net = NetController(config.get('client.port', 59496))
self.onionrCore.daemonQueueAdd('shutdown')
try:
self.onionrCore.daemonQueueAdd('shutdown')
except sqlite3.OperationalError:
pass
net.killTor()
except Exception as e:
logger.error('Failed to shutdown daemon.', error = e, timestamp = False)