keyerror bugfix and increased api timeout

This commit is contained in:
Kevin Froman 2019-01-22 14:15:02 -06:00
parent ee9023b150
commit 0302447588
2 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,7 @@ import onionrutils, onionrexceptions, onionrcrypto, blockimporter, onionrevents
class FDSafeHandler(WSGIHandler):
def handle(self):
timeout = Timeout(10, exception=Exception)
timeout = Timeout(60, exception=Exception)
timeout.start()
#timeout = gevent.Timeout.start_new(3)

View File

@ -244,7 +244,10 @@ class OnionrCommunicatorDaemon:
continue
if blockHash in self._core.getBlockList():
logger.debug('Block %s is already saved.' % (blockHash,))
del self.blockQueue[blockHash]
try:
del self.blockQueue[blockHash]
except KeyError:
pass
continue
if self._core._blacklist.inBlacklist(blockHash):
continue